#import <FlutterEngineGroup.h>
Instance Methods | |
(instancetype) | - NS_UNAVAILABLE |
(instancetype) | - initWithName:project: |
(FlutterEngine *) | - makeEngineWithEntrypoint:libraryURI: |
(FlutterEngine *) | - makeEngineWithEntrypoint:libraryURI:initialRoute: |
(FlutterEngine *) | - makeEngineWithOptions: |
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.
- (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 22 of file FlutterEngineGroup.mm.
References _name.
- (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 32 of file FlutterEngineGroup.mm.
References makeEngineWithEntrypoint:libraryURI:initialRoute:.
- (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 37 of file FlutterEngineGroup.mm.
References FlutterEngineGroupOptions::entrypoint, FlutterEngineGroupOptions::initialRoute, FlutterEngineGroupOptions::libraryURI, and makeEngineWithOptions:.
Referenced by makeEngineWithEntrypoint:libraryURI:.
- (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 47 of file FlutterEngineGroup.mm.
References engine, FlutterEngineGroupOptions::entrypoint, FlutterEngineGroupOptions::entrypointArgs, FlutterEngineGroupOptions::initialRoute, FlutterEngineGroupOptions::libraryURI, FlutterEngine::runWithEntrypoint:libraryURI:initialRoute:entrypointArgs:, and FlutterEngine::spawnWithEntrypoint:libraryURI:initialRoute:entrypointArgs:.
Referenced by makeEngineWithEntrypoint:libraryURI:initialRoute:.
- (instancetype) NS_UNAVAILABLE |