Flutter Engine
FlutterHeadlessDartRunner Class Reference

#import <FlutterHeadlessDartRunner.h>

Inheritance diagram for FlutterHeadlessDartRunner:
FlutterEngine

Instance Methods

(instancetype) - initWithName:project:
 
(instancetype) - initWithName:project:allowHeadlessExecution:
 
(instancetype) - init
 
- Instance Methods inherited from FlutterEngine
(instancetype) - initWithName:
 
(instancetype) - initWithName:project:
 
(instancetype) - initWithName:project:allowHeadlessExecution:
 
(BOOL) - run
 
(BOOL) - runWithEntrypoint:
 
(BOOL) - runWithEntrypoint:initialRoute:
 
(BOOL) - runWithEntrypoint:libraryURI:
 
(void) - destroyContext
 
(void) - ensureSemanticsEnabled
 
(nonnull instancetype) - initWithName:project:
 
(nonnull instancetype) - initWithName:project:allowHeadlessExecution:
 
(nonnull instancetype) - NS_UNAVAILABLE
 
(BOOL) - runWithEntrypoint:
 
(void) - shutDownEngine
 
(instancetype) - initWithScenario:withCompletion:
 
(void) - setBinaryMessenger:
 
(void) - waitForFirstFrame:callback:
 

Additional Inherited Members

- Class Methods inherited from FlutterEngine
(instancetype) + NS_UNAVAILABLE
 
- Properties inherited from FlutterEngine
FlutterViewControllerviewController
 
FlutterMethodChannellocalizationChannel
 
FlutterMethodChannelnavigationChannel
 
FlutterMethodChannelplatformChannel
 
FlutterMethodChanneltextInputChannel
 
FlutterBasicMessageChannellifecycleChannel
 
FlutterBasicMessageChannelsystemChannel
 
FlutterBasicMessageChannelsettingsChannel
 
FlutterBasicMessageChannelkeyEventChannel
 
NSURL * observatoryUrl
 
NSObject< FlutterBinaryMessenger > * binaryMessenger
 
NSString * isolateId
 
BOOL isGpuDisabled
 
id< FlutterBinaryMessenger > binaryMessenger
 

Detailed Description

The deprecated FlutterHeadlessDartRunner runs Flutter Dart code with a null rasterizer, and no native drawing surface. It is appropriate for use in running Dart code e.g. in the background from a plugin.

Most callers should prefer using FlutterEngine directly; this interface exists for legacy support.

Definition at line 34 of file FlutterHeadlessDartRunner.h.

Method Documentation

◆ init()

- (instancetype) init

Not recommended for use - will initialize with a default label ("io.flutter.headless") and the default FlutterDartProject.

Reimplemented from FlutterEngine.

◆ initWithName:project:()

- (instancetype) initWithName: (NSString *)  labelPrefix
project: (FlutterDartProject *)  projectOrNil 

Iniitalize this FlutterHeadlessDartRunner with a FlutterDartProject.

If the FlutterDartProject is not specified, the FlutterHeadlessDartRunner will attempt to locate the project in a default location.

A newly initialized engine will not run the FlutterDartProject until either -runWithEntrypoint: or -runWithEntrypoint:libraryURI is called.

Parameters
labelPrefixThe label prefix used to identify threads for this instance. Should be unique across FlutterEngine instances
projectOrNilThe FlutterDartProject to run.

◆ initWithName:project:allowHeadlessExecution:()

- (instancetype) initWithName: (NSString *)  labelPrefix
project: (FlutterDartProject *)  projectOrNil
allowHeadlessExecution: (BOOL)  NS_DESIGNATED_INITIALIZER 

Iniitalize this FlutterHeadlessDartRunner with a FlutterDartProject.

If the FlutterDartProject is not specified, the FlutterHeadlessDartRunner will attempt to locate the project in a default location.

A newly initialized engine will not run the FlutterDartProject until either -runWithEntrypoint: or -runWithEntrypoint:libraryURI is called.

Parameters
labelPrefixThe label prefix used to identify threads for this instance. Should be unique across FlutterEngine instances
projectOrNilThe FlutterDartProject to run.
allowHeadlessExecutionMust be set to YES.

The documentation for this class was generated from the following file: