StreamLazyMixin<T> mixin

pause的对象不会立即进入dirty状态,会在一个新的数据被添加进来后, 设为dirty状态,只有在dirty状态下,resume才有可能调用_childResume, 获取新数据

Mixin Applications

Properties

activeUnits Set<StreamSubscriptionUnit<T>>
final
dirtyUnits Set<StreamSubscriptionUnit<T>>
final
hashCode int
The hash code for this object.
no setterinherited
hasListener bool
no setter
isCanceled bool
no setter
isDisposed bool
no setter
isPaused bool
no setter
lastData ↔ T?
getter/setter pair
listenFirst bool
no setter
pausedUnits Set<StreamSubscriptionUnit<T>>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldCache bool
no setter
stream SenderLayzeStream<T>
no setter
streamAsync SenderLayzeStream<T>
no setter

Methods

add(T data) → void
addError(Object error, StackTrace stackTrace) → void
close() → void
dispose() → void
没有监听者调用一次
listen(void onData(T event)?, {Function? onError, void onDone()?, bool? cancelOnError, bool async = false}) StreamSubscription<T>
moveToDirty() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyClient() → void
onListen(StreamSubscriptionUnit<T> child) → void
resetDispose() → void
toString() String
A string representation of this object.
inherited
trigger({StreamSubscriptionUnit<T>? self}) → void
如果isPaused状态没有改变,resume时有可能发生这种情况 手动为self更新数据

Operators

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

Static Methods

ifSelfCancel(StreamSubscriptionUnit self) bool