// Instantiate a FlutterEngine.

val

flutterEngine

FlutterEngine

context

// 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

()