Flutter Engine
The Flutter Engine
|
Public Member Functions | |
NewEngineIntentBuilder (@NonNull Class<? extends FlutterFragmentActivity > activityClass) | |
NewEngineIntentBuilder | initialRoute (@NonNull String initialRoute) |
NewEngineIntentBuilder | backgroundMode (@NonNull BackgroundMode backgroundMode) |
NewEngineIntentBuilder | dartEntrypointArgs (@Nullable List< String > dartEntrypointArgs) |
Intent | build (@NonNull Context context) |
Builder to create an Intent
that launches a FlutterFragmentActivity
with a new io.flutter.embedding.engine.FlutterEngine
and the desired configuration.
Definition at line 94 of file FlutterFragmentActivity.java.
|
inline |
Constructor that allows this NewEngineIntentBuilder
to be used by subclasses of FlutterFragmentActivity
.
Subclasses of FlutterFragmentActivity
should provide their own static version of withNewEngine()
, which returns an instance of NewEngineIntentBuilder
constructed with a Class
reference to the FlutterFragmentActivity
subclass, e.g.:
return new NewEngineIntentBuilder(MyFlutterActivity.class);
Definition at line 111 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 142 of file FlutterFragmentActivity.java.
|
inline |
Creates and returns an Intent
that will launch a FlutterFragmentActivity
with the desired configuration.
Definition at line 167 of file FlutterFragmentActivity.java.
|
inline |
The Dart entrypoint arguments will be passed as a list of string to Dart's entrypoint function.
A value of null means do not pass any arguments to Dart's entrypoint function.
dartEntrypointArgs | The Dart entrypoint arguments. |
Definition at line 157 of file FlutterFragmentActivity.java.
|
inline |
The initial route that a Flutter app will render in this FlutterFragmentActivity
, defaults to "/".
Definition at line 120 of file FlutterFragmentActivity.java.