FFI plugins (#96225)

This commit is contained in:
Daco Harkes
2022-01-26 23:44:45 +01:00
committed by GitHub
parent f15dd780d4
commit 0e2f51dfd0
59 changed files with 1441 additions and 254 deletions

View File

@@ -1,14 +1,14 @@
import 'package:flutter/material.dart';
{{#withPluginHook}}
{{#withPlatformChannelPluginHook}}
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:{{pluginProjectName}}/{{pluginProjectName}}.dart';
{{/withPluginHook}}
{{/withPlatformChannelPluginHook}}
void main() => runApp(const MyApp());
{{^withPluginHook}}
{{^withPlatformChannelPluginHook}}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@@ -117,8 +117,8 @@ class _MyHomePageState extends State<MyHomePage> {
);
}
}
{{/withPluginHook}}
{{#withPluginHook}}
{{/withPlatformChannelPluginHook}}
{{#withPlatformChannelPluginHook}}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@@ -171,4 +171,4 @@ class _MyAppState extends State<MyApp> {
);
}
}
{{/withPluginHook}}
{{/withPlatformChannelPluginHook}}

View File

@@ -8,7 +8,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
{{^withFfiPluginHook}}
import 'package:{{projectName}}/main.dart';
{{/withFfiPluginHook}}
{{^withPluginHook}}
void main() {
@@ -30,7 +32,7 @@ void main() {
});
}
{{/withPluginHook}}
{{#withPluginHook}}
{{#withPlatformChannelPluginHook}}
void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame.
@@ -46,4 +48,4 @@ void main() {
);
});
}
{{/withPluginHook}}
{{/withPlatformChannelPluginHook}}