Flutter Engine
The Flutter Engine
Instance Methods | List of all members
FlutterEngine(ScenariosTest) Category Reference

#import <FlutterEngine+ScenariosTest.h>

Instance Methods

(instancetype) - initWithScenario:withCompletion:
 
(FlutterEngine *) - spawnWithEntrypoint:libraryURI:initialRoute:entrypointArgs:
 

Detailed Description

Definition at line 11 of file FlutterEngine+ScenariosTest.h.

Method Documentation

◆ initWithScenario:withCompletion:

- (instancetype) initWithScenario: (NSString*)  scenario
withCompletion: (nullable void(^)(void))  engineRunCompletion 

Extends class FlutterEngine.

Definition at line 1 of file FlutterEngine+ScenariosTest.m.

9 :(NSString*)scenario
10 withCompletion:(nullable void (^)(void))engineRunCompletion {
11 NSAssert([scenario length] != 0, @"You need to provide a scenario");
12 self = [self initWithName:[NSString stringWithFormat:@"Test engine for %@", scenario]
13 project:nil];
14 [self run];
15
16 [self.binaryMessenger setMessageHandlerOnChannel:@"waiting_for_status"
17 binaryMessageHandler:^(NSData* message, FlutterBinaryReply reply) {
19 methodChannelWithName:@"driver"
20 binaryMessenger:self.binaryMessenger
22 [channel invokeMethod:@"set_scenario"
23 arguments:@{@"name" : scenario}];
24
25 if (engineRunCompletion != nil) {
26 engineRunCompletion();
27 }
28 }];
29 return self;
30}
instancetype sharedInstance()
instancetype methodChannelWithName:binaryMessenger:codec:(NSString *name,[binaryMessenger] NSObject< FlutterBinaryMessenger > *messenger,[codec] NSObject< FlutterMethodCodec > *codec)
size_t length

◆ spawnWithEntrypoint:libraryURI:initialRoute:entrypointArgs:

- (FlutterEngine *) spawnWithEntrypoint: (nullable NSString *)  entrypoint
libraryURI: (nullable NSString *)  libraryURI
initialRoute: (nullable NSString *)  initialRoute
entrypointArgs: (nullable NSArray< NSString * > *)  entrypointArgs 

Extends class FlutterEngine.


The documentation for this category was generated from the following files: