override

fun

onTrimMemory

level

Int

super

onTrimMemory

level

flutterFragment

!!

onTrimMemory

level

With the OS signals forwarded to Flutter,
your FlutterFragment works as expected.
You have now added a FlutterFragment to your existing Android app.

The simplest integration path uses a new FlutterEngine,
which comes with a non-trivial initialization time,
leading to a blank UI until Flutter is
initialized and rendered the first time.
Most of this time overhead can be avoided by using
a cached, pre-warmed FlutterEngine, which is discussed next.

Using a pre-warmed FlutterEngine