PluginEventChannel<T> class

A named channel for sending events to the framework-side using streams.

This is the platform-side equivalent of EventChannel. Whereas EventChannel receives a stream of events from platform plugins, this channel sends a stream of events to the handler listening on the framework-side.

The channel name must not be null. If no codec is provided, then StandardMethodCodec is used. If no binaryMessenger is provided, then pluginBinaryMessenger, which sends messages to the framework-side, is used.

Constructors

PluginEventChannel(String name, [MethodCodec codec = const StandardMethodCodec(), BinaryMessenger binaryMessenger])
Creates a new plugin event channel.
const

Properties

binaryMessenger BinaryMessenger
The messenger used by this channel to send platform messages. [...]
read-only
codec MethodCodec
The message codec used by this channel. [...]
final
controller StreamController<T>
Set the stream controller for this event channel.
write-only
hashCode int
The hash code for this object. [...]
read-only, inherited
name String
The logical channel on which communication happens. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited