mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 06:48:26 +00:00
Add a FlutterView level integration example on Android for add-to-app (#632)
This commit is contained in:
@@ -7,6 +7,8 @@ import 'package:flutter/services.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher.dart' as launcher;
|
||||
|
||||
import 'cell.dart';
|
||||
|
||||
/// The entrypoint for the flutter module.
|
||||
void main() {
|
||||
// This call ensures the Flutter binding has been set up before creating the
|
||||
@@ -23,6 +25,14 @@ void main() {
|
||||
);
|
||||
}
|
||||
|
||||
/// This is on alternate entrypoint for this module to display Flutter UI in
|
||||
/// a (multi-)view integration scenario.
|
||||
// This is unfortunately in this file due to
|
||||
// https://github.com/flutter/flutter/issues/72630.
|
||||
void showCell() {
|
||||
runApp(Cell());
|
||||
}
|
||||
|
||||
/// A simple model that uses a [MethodChannel] as the source of truth for the
|
||||
/// state of a counter.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user