Unverified Commit 73425740 authored by Daco Harkes's avatar Daco Harkes Committed by GitHub

Fix plugin_ffi bindings regen command and bump ffigen (#104844)

parent 620ec17c
# Run with `dart run ffigen --config ffigen.yaml`. # Run with `flutter pub run ffigen --config ffigen.yaml`.
name: {{pluginDartClass}}Bindings name: {{pluginDartClass}}Bindings
description: | description: |
Bindings for `src/{{projectName}}.h`. 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' output: 'lib/{{projectName}}_bindings_generated.dart'
headers: headers:
entry-points: entry-points:
......
...@@ -9,7 +9,7 @@ import 'dart:ffi' as ffi; ...@@ -9,7 +9,7 @@ import 'dart:ffi' as ffi;
/// Bindings for `src/{{projectName}}.h`. /// 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 { class {{pluginDartClass}}Bindings {
/// Holds the symbol lookup function. /// Holds the symbol lookup function.
...@@ -48,9 +48,9 @@ class {{pluginDartClass}}Bindings { ...@@ -48,9 +48,9 @@ class {{pluginDartClass}}Bindings {
/// A longer lived native function, which occupies the thread calling it. /// A longer lived native function, which occupies the thread calling it.
/// ///
/// Calling these kind of native functions in the main isolate will /// Do not call these kind of native functions in the main isolate. They will
/// block Dart execution and cause dropped frames in Flutter applications. /// block Dart execution. This will cause dropped frames in Flutter applications.
/// Consider calling such native functions from a separate isolate. /// Instead, call these native functions on a separate isolate.
int sum_long_running( int sum_long_running(
int a, int a,
int b, int b,
......
...@@ -23,8 +23,8 @@ dependencies: ...@@ -23,8 +23,8 @@ dependencies:
dev_dependencies: dev_dependencies:
{{#withFfiPluginHook}} {{#withFfiPluginHook}}
ffi: ^1.1.2 ffi: ^1.2.1
ffigen: ^4.1.2 ffigen: ^5.0.1
{{/withFfiPluginHook}} {{/withFfiPluginHook}}
flutter_test: flutter_test:
sdk: flutter sdk: flutter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment