Flutter Engine
FlutterViewControllerTest Class Reference
Inheritance diagram for FlutterViewControllerTest:

Instance Methods

(void) - sendMessage:reply:


id mockEngine
id mockTextInputPlugin
id messageSent

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

Definition at line 13 of file FlutterViewControllerTest.m.

◆ messageSent

- (id) messageSent

Definition at line 130 of file FlutterViewControllerTest.mm.

Referenced by sendMessage:reply:.

◆ mockEngine

- (id) mockEngine

Definition at line 128 of file FlutterViewControllerTest.mm.

Referenced by sendMessage:reply:.

◆ mockTextInputPlugin

- (id) mockTextInputPlugin

Definition at line 129 of file FlutterViewControllerTest.mm.

Referenced by sendMessage:reply:.

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