"my_engine_id"

shouldAttachEngineToActivity

false

build

();

// Using a new FlutterEngine.

val

flutterFragment

FlutterFragment

withNewEngine

()

shouldAttachEngineToActivity

false

build

()

// Using a cached FlutterEngine.

val

flutterFragment

FlutterFragment

withCachedEngine

"my_engine_id"

shouldAttachEngineToActivity

false

build

()

Note:
  Some plugins may expect or require an Activity reference.
  Ensure that none of your plugins require an Activity
  before you disable access.