In other apps, Fragments are used to represent only
a portion of a UI. A FlutterFragment might be used to
implement the inside of a drawer, a video player,
or a single card. In these situations, it would be
inappropriate for the FlutterFragment to affect
Android’s system chrome because there are other UI
pieces within the same Window.

Java

Kotlin

// Using a new FlutterEngine.

FlutterFragment

flutterFragment

FlutterFragment

withNewEngine

()

shouldAttachEngineToActivity

false

build

();

// Using a cached FlutterEngine.

FlutterFragment

flutterFragment

FlutterFragment

withCachedEngine

"my_engine_id"

shouldAttachEngineToActivity