FlutterFragment

flutterFragment

FlutterFragment

withNewEngine

()

initialRoute

"myInitialRoute/"

build

();

// With a new FlutterEngine.

val

flutterFragment

FlutterFragment

withNewEngine

()

initialRoute

"myInitialRoute/"

build

()

Run Flutter from a specified entrypoint

Similar to varying initial routes, different
FlutterFragments may want to execute different
Dart entrypoints. In a typical Flutter app, there is only one
Dart entrypoint: main(), but you can define other entrypoints.

FlutterFragment supports specification of the desired
Dart entrypoint to execute for the given Flutter experience.
To specify an entrypoint, build FlutterFragment, as shown: