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.

Constructors

ChannelBuffers()

Properties

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

Methods

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. [...]
push(String channel, ByteData data, PlatformMessageResponseCallback callback) bool
Returns true on overflow.
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 ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

kControlChannelName → const String
'dev.flutter/channel-buffers'
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. [...]
1