Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
73425740
Unverified
Commit
73425740
authored
May 27, 2022
by
Daco Harkes
Committed by
GitHub
May 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix plugin_ffi bindings regen command and bump ffigen (#104844)
parent
620ec17c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
ffigen.yaml.tmpl
packages/flutter_tools/templates/plugin_ffi/ffigen.yaml.tmpl
+2
-2
projectName_bindings_generated.dart.tmpl
...s/plugin_ffi/lib/projectName_bindings_generated.dart.tmpl
+4
-4
pubspec.yaml.tmpl
...s/flutter_tools/templates/plugin_shared/pubspec.yaml.tmpl
+2
-2
No files found.
packages/flutter_tools/templates/plugin_ffi/ffigen.yaml.tmpl
View file @
73425740
# Run with `
dart
run ffigen --config ffigen.yaml`.
# Run with `
flutter pub
run ffigen --config ffigen.yaml`.
name: {{pluginDartClass}}Bindings
description: |
Bindings for `src/{{projectName}}.h`.
Regenerate bindings with `
dart
run ffigen --config ffigen.yaml`.
Regenerate bindings with `
flutter pub
run ffigen --config ffigen.yaml`.
output: 'lib/{{projectName}}_bindings_generated.dart'
headers:
entry-points:
...
...
packages/flutter_tools/templates/plugin_ffi/lib/projectName_bindings_generated.dart.tmpl
View file @
73425740
...
...
@@ -9,7 +9,7 @@ import 'dart:ffi' as ffi;
/// Bindings for `src/{{projectName}}.h`.
///
/// Regenerate bindings with `
dart
run ffigen --config ffigen.yaml`.
/// Regenerate bindings with `
flutter pub
run ffigen --config ffigen.yaml`.
///
class {{pluginDartClass}}Bindings {
/// Holds the symbol lookup function.
...
...
@@ -48,9 +48,9 @@ class {{pluginDartClass}}Bindings {
/// A longer lived native function, which occupies the thread calling it.
///
///
Calling these kind of native functions in the main isolate
will
/// block Dart execution
and
cause dropped frames in Flutter applications.
///
Consider calling such native functions from
a separate isolate.
///
Do not call these kind of native functions in the main isolate. They
will
/// block Dart execution
. This will
cause dropped frames in Flutter applications.
///
Instead, call these native functions on
a separate isolate.
int sum_long_running(
int a,
int b,
...
...
packages/flutter_tools/templates/plugin_shared/pubspec.yaml.tmpl
View file @
73425740
...
...
@@ -23,8 +23,8 @@ dependencies:
dev_dependencies:
{{#withFfiPluginHook}}
ffi: ^1.
1.2
ffigen: ^
4.1.2
ffi: ^1.
2.1
ffigen: ^
5.0.1
{{/withFfiPluginHook}}
flutter_test:
sdk: flutter
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment