Flutter Engine
FlutterChannels.h File Reference

Go to the source code of this file.


class  FlutterBasicMessageChannel
class  FlutterMethodChannel
protocol  <FlutterStreamHandler>
class  FlutterEventChannel


typedef void(^ FlutterMessageHandler) (id _Nullable message, FlutterReply callback)
typedef void(^ FlutterResult) (id _Nullable result)
typedef void(^ FlutterMethodCallHandler) (FlutterMethodCall *call, FlutterResult result)
typedef void(^ FlutterEventSink) (id _Nullable event)


NS_ASSUME_NONNULL_BEGIN typedef void(^ FlutterReply )(id _Nullable reply)
FLUTTER_DARWIN_EXPORT NSObject const * FlutterMethodNotImplemented
FLUTTER_DARWIN_EXPORT NSObject const * FlutterEndOfEventStream

Typedef Documentation

◆ FlutterEventSink

typedef void(^ FlutterEventSink) (id _Nullable event)

An event sink callback.

eventThe event.

Definition at line 270 of file FlutterChannels.h.

◆ FlutterMessageHandler

typedef void(^ FlutterMessageHandler) (id _Nullable message, FlutterReply callback)

A strategy for handling incoming messages from Flutter and to send asynchronous replies back to Flutter.

messageThe message.
callbackA callback for submitting a reply to the sender.

Definition at line 29 of file FlutterChannels.h.

◆ FlutterMethodCallHandler

typedef void(^ FlutterMethodCallHandler) (FlutterMethodCall *call, FlutterResult result)

A strategy for handling method calls.

callThe incoming method call.
resultA callback to asynchronously submit the result of the call. Invoke the callback with a FlutterError to indicate that the call failed. Invoke the callback with FlutterMethodNotImplemented to indicate that the method was unknown. Any other values, including nil, are interpreted as successful results.

Definition at line 147 of file FlutterChannels.h.

◆ FlutterResult

typedef void(^ FlutterResult) (id _Nullable result)

A method call result callback.

Used for submitting a method call result back to a Flutter caller. Also used in the dual capacity for handling a method call result received from Flutter.

resultThe result.

Definition at line 135 of file FlutterChannels.h.

Variable Documentation

◆ FlutterEndOfEventStream

FLUTTER_DARWIN_EXPORT NSObject const* FlutterEndOfEventStream

A constant used with FlutterEventChannel to indicate end of stream.

Definition at line 264 of file FlutterChannels.mm.

Referenced by FlutterEventChannel::initWithName:binaryMessenger:codec:.

◆ FlutterMethodNotImplemented

◆ FlutterReply

NS_ASSUME_NONNULL_BEGIN typedef void(^ FlutterReply) (id _Nullable reply)

A message reply callback.

Used for submitting a reply back to a Flutter message sender. Also used in the dual capacity for handling a message reply received from Flutter.

replyThe reply.

Referenced by flutter::AccessibilityBridge::AccessibilityBridge(), FlutterBasicMessageChannel::initWithName:binaryMessenger:codec:, and flutter::testing::TEST().