Flutter Engine
The Flutter Engine
|
Classes | |
class | Options |
Public Member Functions | |
FlutterEngineGroup (@NonNull Context context) | |
FlutterEngineGroup (@NonNull Context context, @Nullable String[] dartVmArgs) | |
FlutterEngine | createAndRunDefaultEngine (@NonNull Context context) |
FlutterEngine | createAndRunEngine ( @NonNull Context context, @Nullable DartEntrypoint dartEntrypoint) |
FlutterEngine | createAndRunEngine ( @NonNull Context context, @Nullable DartEntrypoint dartEntrypoint, @Nullable String initialRoute) |
FlutterEngine | createAndRunEngine (@NonNull Options options) |
Package Functions | |
FlutterEngine | createEngine (Context context, @NonNull PlatformViewsController platformViewsController, boolean automaticallyRegisterPlugins, boolean waitForRestorationData) |
Package Attributes | |
final List< FlutterEngine > | activeEngines = new ArrayList<>() |
Represents a collection of io.flutter.embedding.engine.FlutterEngine
s who share resources to allow them to be created faster and with less memory than calling the io.flutter.embedding.engine.FlutterEngine
's constructor multiple times.
When creating or recreating the first io.flutter.embedding.engine.FlutterEngine
in the FlutterEngineGroup, the behavior is the same as creating a io.flutter.embedding.engine.FlutterEngine
via its constructor. When subsequent io.flutter.embedding.engine.FlutterEngine
s are created, resources from an existing living io.flutter.embedding.engine.FlutterEngine
is re-used.
The shared resources are kept until the last surviving io.flutter.embedding.engine.FlutterEngine
is destroyed.
Deleting a FlutterEngineGroup doesn't invalidate its existing io.flutter.embedding.engine.FlutterEngine
s, but it eliminates the possibility to create more io.flutter.embedding.engine.FlutterEngine
s in that group.
Definition at line 36 of file FlutterEngineGroup.java.
|
inline |
Create a FlutterEngineGroup whose child engines will share resources.
Since the FlutterEngineGroup is likely to have a longer lifecycle than any individual Android component, it's more semantically correct to pass in an application context rather than the individual Android component's context to minimize the chances of leaks.
Definition at line 47 of file FlutterEngineGroup.java.
|
inline |
Create a FlutterEngineGroup whose child engines will share resources. Use dartVmArgs
to pass flags to the Dart VM during initialization.
Since the FlutterEngineGroup is likely to have a longer lifecycle than any individual Android component, it's more semantically correct to pass in an application context rather than the individual Android component's context to minimize the chances of leaks.
Definition at line 59 of file FlutterEngineGroup.java.
|
inline |
Creates a io.flutter.embedding.engine.FlutterEngine
in this group and run its io.flutter.embedding.engine.dart.DartExecutor
with a default entrypoint of the "main" function in the "lib/main.dart" file.
If no prior io.flutter.embedding.engine.FlutterEngine
were created in this group, the initialization cost will be slightly higher than subsequent engines. The very first io.flutter.embedding.engine.FlutterEngine
created per program, regardless of FlutterEngineGroup, also incurs the Dart VM creation time.
Subsequent engine creations will share resources with existing engines. However, if all existing engines were io.flutter.embedding.engine.FlutterEngine#destroy()
ed, the next engine created will recreate its dependencies.
Definition at line 81 of file FlutterEngineGroup.java.
|
inline |
Creates a io.flutter.embedding.engine.FlutterEngine
in this group and run its io.flutter.embedding.engine.dart.DartExecutor
with the specified DartEntrypoint
.
If no prior io.flutter.embedding.engine.FlutterEngine
were created in this group, the initialization cost will be slightly higher than subsequent engines. The very first io.flutter.embedding.engine.FlutterEngine
created per program, regardless of FlutterEngineGroup, also incurs the Dart VM creation time.
Subsequent engine creations will share resources with existing engines. However, if all existing engines were io.flutter.embedding.engine.FlutterEngine#destroy()
ed, the next engine created will recreate its dependencies.
Definition at line 98 of file FlutterEngineGroup.java.
|
inline |
Creates a io.flutter.embedding.engine.FlutterEngine
in this group and run its io.flutter.embedding.engine.dart.DartExecutor
with the specified DartEntrypoint
and the specified initialRoute
.
If no prior io.flutter.embedding.engine.FlutterEngine
were created in this group, the initialization cost will be slightly higher than subsequent engines. The very first io.flutter.embedding.engine.FlutterEngine
created per program, regardless of FlutterEngineGroup, also incurs the Dart VM creation time.
Subsequent engine creations will share resources with existing engines. However, if all existing engines were io.flutter.embedding.engine.FlutterEngine#destroy()
ed, the next engine created will recreate its dependencies.
Definition at line 117 of file FlutterEngineGroup.java.
|
inline |
Creates a io.flutter.embedding.engine.FlutterEngine
in this group and run its io.flutter.embedding.engine.dart.DartExecutor
with the specified DartEntrypoint
, the specified initialRoute
and the dartEntrypointArgs
.
If no prior io.flutter.embedding.engine.FlutterEngine
were created in this group, the initialization cost will be slightly higher than subsequent engines. The very first io.flutter.embedding.engine.FlutterEngine
created per program, regardless of FlutterEngineGroup, also incurs the Dart VM creation time.
Subsequent engine creations will share resources with existing engines. However, if all existing engines were io.flutter.embedding.engine.FlutterEngine#destroy()
ed, the next engine created will recreate its dependencies.
Definition at line 139 of file FlutterEngineGroup.java.
|
inlinepackage |
Definition at line 201 of file FlutterEngineGroup.java.
|
package |
Definition at line 38 of file FlutterEngineGroup.java.