SynchronousStreamControllerMixin<T> mixin
class MySynchronousStreamController with SynchronousStreamControllerMixin<T> implements SynchronousStreamController<T> {
// Must override
@override
SynchronousStreamController get synchronousStreamController;
...
}
Properties
-
done
→ Future
-
A future which is completed when the stream controller is done
sending events.
no setterinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
hasListener
→ bool
-
Whether there is a subscriber on the Stream.
no setterinherited
-
isClosed
→ bool
-
Whether the stream controller is closed for adding more events.
no setterinherited
-
isPaused
→ bool
-
Whether the subscription would need to buffer events.
no setterinherited
-
onCancel
↔ FutureOr<void> Function()?
-
The callback which is called when the stream is canceled.
getter/setter pairinherited
-
onListen
↔ void Function()?
-
The callback which is called when the stream is listened to.
getter/setter pairinherited
-
onPause
↔ void Function()?
-
The callback which is called when the stream is paused.
getter/setter pairinherited
-
onResume
↔ void Function()?
-
The callback which is called when the stream is resumed.
getter/setter pairinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
sink
→ StreamSink<T>
-
Returns a view of this object that only exposes the StreamSink interface.
no setterinherited
-
stream
→ Stream<T>
-
The stream that this controller is controlling.
no setterinherited
-
synchronousStreamController
→ SynchronousStreamController<T>
-
no setter
Methods
-
add(T data)
→ void
-
Adds event to the controller's stream.
override
-
addError(Object error, [StackTrace? stackTrace])
→ void
-
Adds error to the controller's stream.
override
-
addStream(Stream<T> source, {bool? cancelOnError})
→ Future
-
Receives events from
source
and puts them into this controller's stream.
inherited
-
close()
→ Future
-
Closes the controller's stream.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited