ChannelBuffers class

Storage of channel messages until the channels are completely routed, i.e. when a message handler is attached to the channel on the framework side.

Each channel has a finite buffer capacity and in a FIFO manner messages will be deleted if the capacity is exceeded. The intention is that these buffers will be drained once a callback is setup on the BinaryMessenger in the Flutter framework.

Clients of Flutter shouldn't need to allocate their own ChannelBuffers and should only access this package's channelBuffers if they are writing their own custom BinaryMessenger.




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


drain(String channel, DrainChannelCallback callback) Future<void>
Remove and process all stored messages for a given channel. [...]
handleMessage(ByteData data) → void
Handle a control message. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
push(String channel, ByteData data, PlatformMessageResponseCallback callback) bool
Returns true on overflow.
toString() String
Returns a string representation of this object.


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


kControlChannelName → const String
kDefaultBufferSize → const int
By default we store one message per channel. There are tradeoffs associated with any size. The correct size should be chosen for the semantics of your channel. [...]