Flutter Engine
The Flutter Engine
|
Public Member Functions | |
CachedEngineIntentBuilder ( @NonNull Class<? extends FlutterFragmentActivity > activityClass, @NonNull String engineId) | |
CachedEngineIntentBuilder | destroyEngineWithActivity (boolean destroyEngineWithActivity) |
CachedEngineIntentBuilder | backgroundMode (@NonNull BackgroundMode backgroundMode) |
Intent | build (@NonNull Context context) |
Builder to create an Intent
that launches a FlutterFragmentActivity
with an existing io.flutter.embedding.engine.FlutterEngine
that is cached in io.flutter.embedding.engine.FlutterEngineCache
.
Definition at line 195 of file FlutterFragmentActivity.java.
|
inline |
Constructor that allows this CachedEngineIntentBuilder
to be used by subclasses of FlutterFragmentActivity
.
Subclasses of FlutterFragmentActivity
should provide their own static version of withCachedEngine(String)
, which returns an instance of
constructed with a
CachedEngineIntentBuilderClass
reference to the
subclass, e.g.:
FlutterFragmentActivity
return new CachedEngineIntentBuilder(MyFlutterActivity.class, engineId);
Definition at line 212 of file FlutterFragmentActivity.java.
|
inline |
The mode of FlutterFragmentActivity
's background, either BackgroundMode#opaque
or BackgroundMode#transparent
.
The default background mode is BackgroundMode#opaque
.
Choosing a background mode of BackgroundMode#transparent
will configure the inner FlutterView
of this FlutterFragmentActivity
to be configured with a FlutterTextureView
to support transparency. This choice has a non-trivial performance impact. A transparent background should only be used if it is necessary for the app design being implemented.
A FlutterFragmentActivity
that is configured with a background mode of BackgroundMode#transparent
must have a theme applied to it that includes the following property: <item name="android:windowIsTranslucent">true</item>
.
Definition at line 246 of file FlutterFragmentActivity.java.
|
inline |
Creates and returns an Intent
that will launch a FlutterFragmentActivity
with the desired configuration.
Definition at line 256 of file FlutterFragmentActivity.java.
|
inline |
Returns true if the cached io.flutter.embedding.engine.FlutterEngine
should be destroyed and removed from the cache when this FlutterFragmentActivity
is destroyed.
The default value is false
.
Definition at line 224 of file FlutterFragmentActivity.java.