);

// Start executing Dart code in the FlutterEngine.

flutterEngine

getDartExecutor

().

executeDartEntrypoint

DartEntrypoint

createDefault

()

);

// Cache the pre-warmed FlutterEngine to be used later by FlutterFragment.

FlutterEngineCache

getInstance

()

put

"my_engine_id"

flutterEngine

);

FlutterFragment

withCachedEngine

"my_engine_id"

).

build

();

// Somewhere in your app, before your FlutterFragment is needed,

// like in the Application class ...

// Instantiate a FlutterEngine.