Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
FakeMessageChannel Class Reference
Inheritance diagram for FakeMessageChannel:
FlutterBasicMessageChannel

Instance Methods

(instancetype) - init
 
(void) - sendMessage:
 
(void) - sendMessage:reply:
 
- Instance Methods inherited from FlutterBasicMessageChannel
(instancetype) - initWithName:binaryMessenger:codec:
 
(instancetype) - initWithName:binaryMessenger:codec:taskQueue:
 
(void) - setMessageHandler:
 
(void) - resizeChannelBuffer:
 
(void) - setWarnsOnOverflow:
 
(instancetype) - initWithName:binaryMessenger:codec:taskQueue: [implementation]
 
(void) - sendMessage: [implementation]
 
(void) - sendMessage:reply: [implementation]
 
(void) - setMessageHandler: [implementation]
 

Properties

NSMutableArray< id > * messages
 
NSDictionary * nextResponse
 

Additional Inherited Members

- Class Methods inherited from FlutterBasicMessageChannel
(instancetype) + messageChannelWithName:binaryMessenger:
 
(instancetype) + messageChannelWithName:binaryMessenger:codec:
 
(void) + resizeChannelWithName:binaryMessenger:size:
 
(void) + setWarnsOnOverflow:forChannelWithName:binaryMessenger:
 

Detailed Description

Definition at line 19 of file FlutterChannelKeyResponderTest.mm.

Method Documentation

◆ init

- (instancetype) init

Definition at line 21 of file FlutterChannelKeyResponderTest.mm.

29 {
30 self = [super init];
31 if (self != nil) {
32 _messages = [[NSMutableArray<id> alloc] init];
33 }
34 return self;
35}

◆ sendMessage:

- (void) sendMessage: (id _Nullable)  message

Sends the specified message to the Flutter side, ignoring any reply.

Parameters
messageThe message. Must be supported by the codec of this channel.

Reimplemented from FlutterBasicMessageChannel.

Definition at line 21 of file FlutterChannelKeyResponderTest.mm.

37 :(id _Nullable)message {
38 [self sendMessage:message reply:nil];
39}
Win32Message message

◆ sendMessage:reply:

- (void) sendMessage: (id _Nullable)  message
reply: (FlutterReply _Nullable)  callback 

Sends the specified message to the Flutter side, expecting an asynchronous reply.

Parameters
messageThe message. Must be supported by the codec of this channel.
callbackA callback to be invoked with the message reply from Flutter.

Reimplemented from FlutterBasicMessageChannel.

Definition at line 21 of file FlutterChannelKeyResponderTest.mm.

41 :(id _Nullable)message reply:(FlutterReply _Nullable)callback {
42 [_messages addObject:message];
43 if (callback) {
44 callback(_nextResponse);
45 }
46}
NS_ASSUME_NONNULL_BEGIN typedef void(^ FlutterReply)(id _Nullable reply)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback

Property Documentation

◆ messages

- (NSMutableArray<id>*) messages
readnonatomicassign

Definition at line 20 of file FlutterChannelKeyResponderTest.mm.

◆ nextResponse

- (NSDictionary*) nextResponse
readwritenonatomicassign

Definition at line 21 of file FlutterChannelKeyResponderTest.mm.


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