GetStream<T> class Null safety

GetStream is the lightest and most performative way of working with events at Dart. You sintaxe is like StreamController, but it works with simple callbacks. In this way, every event calls only one function. There is no buffering, to very low memory consumption. event add will add a object to stream. addError will add a error to stream. listen is a very light StreamSubscription interface. Is possible take the last value with value property.

Constructors

GetStream({void onListen()?, void onPause()?, void onResume()?, FutureOr<void> onCancel()?})

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
hasListeners bool
read-only
isClosed bool
read-only
length int?
read-only
onCancel ↔ (FutureOr<void> Function?()?)
read / write
onListen ↔ (void Function?()?)
read / write
onPause ↔ (void Function?()?)
read / write
onResume ↔ (void Function?()?)
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stream Stream<T>
read-only
value → T?
read-only

Methods

add(T event) → void
addError(Object error, [StackTrace? stackTrace]) → void
addSubscription(LightSubscription<T> subs) FutureOr<void>
close() → void
listen(void onData(T event), {Function? onError, void onDone()?, bool? cancelOnError}) LightSubscription<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeSubscription(LightSubscription<T> subs) FutureOr<bool?>
toString() String
A string representation of this object. [...]
inherited

Operators

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