GetStream<T> class

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.
no setterinherited
hasListeners bool
no setter
isClosed bool
no setter
length int?
no setter
onCancel ↔ (FutureOr<void> Function()?)
getter/setter pair
onListen ↔ (void Function()?)
getter/setter pair
onPause ↔ (void Function()?)
getter/setter pair
onResume ↔ (void Function()?)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<T>
no setter
value → T?
no setter

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 nonexistent 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