NonBlockingChannel<T> class Null safety

Implemented types

Constructors

NonBlockingChannel()
NonBlockingChannel.from(Iterable<T> values)
factory
NonBlockingChannel.fromStream(Stream<T> stream)
factory

Properties

hashCode int
The hash code for this object.
read-onlyinherited
isClosed bool
Is the channel closed?
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

asStream() Stream<ChannelEvent<T>>
Reads the channel as Stream.
override
close() → void
Closes the channel so that no more values can be sent to it.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
pipe(Stream<T> stream) Future<void>
Pipes the content of stream into the channel
override
receive() Future<ChannelEvent<T>>
Reads one value from the channel. Returns immediately if a value is available in the channel. If the channel is empty, a future is returned that resolves with the value when a new value is available.
override
send(T value) → void
Sends one value to the channel
override
sendAll(Iterable<T> values) → void
Sends all values to the channel
override
toString() String
A string representation of this object.
inherited
tryReceive({T? onClose}) Future<T?>
Reads one value from the channel. Returns null or onClose if the channel has no value and it is closed.
override

Operators

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