Flutter Engine
FlutterViewControllerTest Class Reference
Inheritance diagram for FlutterViewControllerTest:

Instance Methods

(void) - sendMessage:reply:
 

Properties

id mockEngine
 
id mockTextInputPlugin
 
id messageSent
 
FlutterViewControllerflutterViewController
 

Detailed Description

Definition at line 127 of file FlutterViewControllerTest.mm.

Method Documentation

◆ sendMessage:reply:()

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

Definition at line 759 of file FlutterViewControllerTest.mm.

References API_AVAILABLE, callback, FlutterEnginePartialMock::keyEventChannel, messageSent, mockEngine, mockTextInputPlugin, FlutterEnginePartialMock::textInputPlugin, and view.

759  :(id _Nullable)message reply:(FlutterReply _Nullable)callback {
760  NSMutableDictionary* replyMessage = [@{
761  @"handled" : @YES,
762  } mutableCopy];
763  // Response is async, so we have to post it to the run loop instead of calling
764  // it directly.
765  self.messageSent = message;
766  CFRunLoopPerformBlock(CFRunLoopGetCurrent(), kCFRunLoopDefaultMode, ^() {
767  callback(replyMessage);
768  });
769 }
FlKeyEvent FlKeyResponderAsyncCallback callback
NS_ASSUME_NONNULL_BEGIN typedef void(^ FlutterReply)(id _Nullable reply)

Property Documentation

◆ flutterViewController

- (FlutterViewController*) flutterViewController
readwritenonatomicstrong

Definition at line 13 of file FlutterViewControllerTest.m.

◆ messageSent

- (id) messageSent
readwritenonatomicstrong

Definition at line 130 of file FlutterViewControllerTest.mm.

Referenced by sendMessage:reply:.

◆ mockEngine

- (id) mockEngine
readwritenonatomicstrong

Definition at line 128 of file FlutterViewControllerTest.mm.

Referenced by sendMessage:reply:.

◆ mockTextInputPlugin

- (id) mockTextInputPlugin
readwritenonatomicstrong

Definition at line 129 of file FlutterViewControllerTest.mm.

Referenced by sendMessage:reply:.


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