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