#include <FlutterChannels.h>
Instance Methods | |
| (instancetype) | - initWithName:binaryMessenger:codec: |
| (instancetype) | - initWithName:binaryMessenger:codec:taskQueue: |
| (void) | - setStreamHandler: |
Class Methods | |
| (instancetype) | + eventChannelWithName:binaryMessenger: |
| (instancetype) | + eventChannelWithName:binaryMessenger:codec: |
A channel for communicating with the Flutter side using event streams.
Definition at line 400 of file FlutterChannels.h.
| + (instancetype) eventChannelWithName: | (NSString *) | name | |
| binaryMessenger: | (NSObject< FlutterBinaryMessenger > *) | messenger | |
Creates a FlutterEventChannel with 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 FlutterStandardMethodCodec to decode stream setup and teardown requests, and to encode event envelopes.
| name | The channel name. |
| messenger | The binary messenger. |
| + (instancetype) eventChannelWithName: | (NSString *) | name | |
| binaryMessenger: | (NSObject< FlutterBinaryMessenger > *) | messenger | |
| codec: | (NSObject< FlutterMethodCodec > *) | codec | |
Creates a FlutterEventChannel with 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.
| name | The channel name. |
| messenger | The binary messenger. |
| codec | The method codec. |
| - (instancetype) initWithName: | (NSString *) | name | |
| binaryMessenger: | (NSObject< FlutterBinaryMessenger > *) | messenger | |
| codec: | (NSObject< FlutterMethodCodec > *) | codec | |
Initializes a FlutterEventChannel with 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 FlutterEngine and FlutterViewController.
| name | The channel name. |
| messenger | The binary messenger. |
| codec | The method codec. |
| - (instancetype) initWithName: | (NSString *) | name | |
| binaryMessenger: | (NSObject< FlutterBinaryMessenger > *) | messenger | |
| codec: | (NSObject< FlutterMethodCodec > *) | codec | |
| taskQueue: | (NSObject< FlutterTaskQueue > *_Nullable) | taskQueue | |
Initializes a FlutterEventChannel with 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 FlutterEngine and FlutterViewController.
| name | The channel name. |
| messenger | The binary messenger. |
| codec | The method codec. |
| taskQueue | The FlutterTaskQueue that executes the handler (see -[FlutterBinaryMessenger makeBackgroundTaskQueue]). |
| - (void) setStreamHandler: | (NSObject< FlutterStreamHandler > *_Nullable) | handler |
Registers a handler for stream setup requests from the Flutter side.
Replaces any existing handler. Use a nil handler for unregistering the existing handler.
| handler | The stream handler. |