FFI plugins (#96225)
This commit is contained in:
@@ -31,6 +31,7 @@ version '1.0'
|
||||
|
||||
android {
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
|
||||
@@ -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}}
|
||||
|
||||
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user