Flutter Engine
The Flutter Engine
|
#import <FlutterEngineGroup.h>
Instance Methods | |
(instancetype) | - NS_UNAVAILABLE |
(instancetype) | - initWithName:project: |
(FlutterEngine *) | - makeEngineWithEntrypoint:libraryURI: |
(FlutterEngine *) | - makeEngineWithEntrypoint:libraryURI:initialRoute: |
(FlutterEngine *) | - makeEngineWithOptions: |
(void) | - dealloc [implementation] |
(FlutterEngine *) | - makeEngine [implementation] |
(void) | - onEngineWillBeDealloced: [implementation] |
Properties | |
NSString * | name [implementation] |
NSMutableArray< NSValue * > * | engines [implementation] |
FlutterDartProject * | project [implementation] |
Represents a collection of FlutterEngines who share resources which allows them to be created with less time const and occupy less memory than just creating multiple FlutterEngines.
Deleting a FlutterEngineGroup doesn't invalidate existing FlutterEngines, but it eliminates the possibility to create more FlutterEngines in that group.
Definition at line 56 of file FlutterEngineGroup.h.
|
implementation |
Definition at line 23 of file FlutterEngineGroup.mm.
- (instancetype) initWithName: | (NSString*) | name | |
project: | (nullable FlutterDartProject*) | NS_DESIGNATED_INITIALIZER | |
Initialize a new FlutterEngineGroup.
name | The name that will present in the threads shared across the engines in this group. |
project | The FlutterDartProject that all FlutterEngines in this group will be executing. |
Definition at line 23 of file FlutterEngineGroup.mm.
|
implementation |
Definition at line 23 of file FlutterEngineGroup.mm.
- (FlutterEngine *) makeEngineWithEntrypoint: | (nullable NSString*) | entrypoint | |
libraryURI: | (nullable NSString*) | libraryURI | |
Creates a running FlutterEngine
that shares components with this group.
entrypoint | The name of a top-level function from a Dart library. If this is FlutterDefaultDartEntrypoint (or nil); this will default to main() . If it is not the app's main() function, that function must be decorated with @pragma(vm:entry-point) to ensure the method is not tree-shaken by the Dart compiler. |
libraryURI | The URI of the Dart library which contains the entrypoint method. IF nil, this will default to the same library as the main() function in the Dart program. |
Definition at line 23 of file FlutterEngineGroup.mm.
- (FlutterEngine *) makeEngineWithEntrypoint: | (nullable NSString*) | entrypoint | |
libraryURI: | (nullable NSString*) | libraryURI | |
initialRoute: | (nullable NSString*) | initialRoute | |
Creates a running FlutterEngine
that shares components with this group.
entrypoint | The name of a top-level function from a Dart library. If this is FlutterDefaultDartEntrypoint (or nil); this will default to main() . If it is not the app's main() function, that function must be decorated with @pragma(vm:entry-point) to ensure the method is not tree-shaken by the Dart compiler. |
libraryURI | The URI of the Dart library which contains the entrypoint method. IF nil, this will default to the same library as the main() function in the Dart program. |
initialRoute | The name of the initial Flutter Navigator Route to load. If this is FlutterDefaultInitialRoute (or nil), it will default to the "/" route. |
Definition at line 23 of file FlutterEngineGroup.mm.
- (FlutterEngine *) makeEngineWithOptions: | (nullable FlutterEngineGroupOptions*) | options |
Creates a running FlutterEngine
that shares components with this group.
options | Options that control how a FlutterEngine should be created. |
Definition at line 23 of file FlutterEngineGroup.mm.
- (instancetype) NS_UNAVAILABLE |
|
implementation |
Definition at line 23 of file FlutterEngineGroup.mm.
|
readwritenonatomicretainimplementation |
Definition at line 22 of file FlutterEngineGroup.mm.
|
readwritenonatomiccopyimplementation |
Definition at line 21 of file FlutterEngineGroup.mm.
|
readwritenonatomicretainimplementation |
Definition at line 23 of file FlutterEngineGroup.mm.