FlutterEventChannel
@interface FlutterEventChannel : NSObject
                A channel for communicating with the Flutter side using event streams.
- 
                  
                  
Creates a
FlutterEventChannelwith the specified name and binary messenger.The channel name logically identifies the channel; identically named channels interfere with each other’s communication.
The binary messenger is a facility for sending raw, binary messages to the Flutter side. This protocol is implemented by
FlutterViewController.The channel uses
FlutterStandardMethodCodecto decode stream setup and teardown requests, and to encode event envelopes.Declaration
Objective-C
+ (nonnull instancetype) eventChannelWithName:(nonnull NSString *)name binaryMessenger:(nonnull NSObject<FlutterBinaryMessenger> *)messenger;Parameters
nameThe channel name.
messengerThe binary messenger.
 - 
                  
                  
Creates a
FlutterEventChannelwith the specified name, binary messenger, and method codec.The channel name logically identifies the channel; identically named channels interfere with each other’s communication.
The binary messenger is a facility for sending raw, binary messages to the Flutter side. This protocol is implemented by
FlutterViewController.Declaration
Objective-C
+ (nonnull instancetype) eventChannelWithName:(nonnull NSString *)name binaryMessenger:(nonnull NSObject<FlutterBinaryMessenger> *)messenger codec:(nonnull NSObject<FlutterMethodCodec> *)codec;Parameters
nameThe channel name.
messengerThe binary messenger.
codecThe method codec.
 - 
                  
                  
Initializes a
FlutterEventChannelwith the specified name, binary messenger, and method codec.The channel name logically identifies the channel; identically named channels interfere with each other’s communication.
The binary messenger is a facility for sending raw, binary messages to the Flutter side. This protocol is implemented by
FlutterEngineandFlutterViewController.Declaration
Objective-C
- (nonnull instancetype) initWithName:(nonnull NSString *)name binaryMessenger:(nonnull NSObject<FlutterBinaryMessenger> *)messenger codec:(nonnull NSObject<FlutterMethodCodec> *)codec;Parameters
nameThe channel name.
messengerThe binary messenger.
codecThe method codec.
 - 
                  
                  
Initializes a
FlutterEventChannelwith the specified name, binary messenger, method codec and task queue.The channel name logically identifies the channel; identically named channels interfere with each other’s communication.
The binary messenger is a facility for sending raw, binary messages to the Flutter side. This protocol is implemented by
FlutterEngineandFlutterViewController.Declaration
Objective-C
- (nonnull instancetype) initWithName:(nonnull NSString *)name binaryMessenger:(nonnull NSObject<FlutterBinaryMessenger> *)messenger codec:(nonnull NSObject<FlutterMethodCodec> *)codec taskQueue:(NSObject<FlutterTaskQueue> *_Nullable)taskQueue;Parameters
nameThe channel name.
messengerThe binary messenger.
codecThe method codec.
taskQueueThe FlutterTaskQueue that executes the handler (see -[FlutterBinaryMessenger makeBackgroundTaskQueue]).
 - 
                  
                  
Registers a handler for stream setup requests from the Flutter side.
Replaces any existing handler. Use a
nilhandler for unregistering the existing handler.Declaration
Objective-C
- (void)setStreamHandler:(NSObject<FlutterStreamHandler> *_Nullable)handler;Parameters
handlerThe stream handler.
 
View on GitHub
Install in Dash
        FlutterEventChannel Class Reference