A Channel based on Stream can share message among Plugin and main program. All of MessageChannel will be cached, same name can get the same MessageChannel

Constructors

MessageChannel(String name, { bool sync: false })

If the channel of name is cached, return the cached one, if not, return a new one. argument sync will only take effect when the channel is non-cached

factory

Properties

controller → StreamController<T>

read / write
name → String

read / write
stream → Stream<T>

read / write
hashCode → int

The hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

getSession(String key) ChannelSession

registerSession(ChannelSession session) → void

Register a ChannelSession to MessageChannel MessageChannel use key of ChannelSeesion to distinguish ChannelSeesion

send(T v) → void

Add a value to stream

toString() → String

Returns a string representation of this object.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited