LifecycleObserverRegistryCacnellable extension

on
  • ILifecycle

Methods

collectOnLifecycle<T>({LifecycleState targetState = LifecycleState.started, bool runWithDelayed = false, bool collectBlockError = false, bool ignoreBlockError = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Stream<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

当高于某个状态时执行给定的block,并将结果收集起来为Stream
collectOnLifecycleResumed<T>({bool runWithDelayed = false, bool collectBlockError = false, bool ignoreBlockError = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Stream<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

collectOnLifecycleStarted<T>({bool runWithDelayed = false, bool collectBlockError = false, bool ignoreBlockError = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Stream<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

launchWhenLifecycleEventDestroy<T>({bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

launchWhenLifecycleStateAtLeast<T>({LifecycleState targetState = LifecycleState.started, bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

当高于某个状态时,执行一次给定的block
launchWhenLifecycleStateDestroyed<T>({bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

launchWhenLifecycleStateResumed<T>({bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

launchWhenLifecycleStateStarted<T>({bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

launchWhenNextLifecycleEvent<T>({LifecycleEvent targetEvent = LifecycleEvent.start, bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

当下一个事件分发时,执行一次给定的block
launchWhenNextLifecycleEventPause<T>({bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

launchWhenNextLifecycleEventResume<T>({bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

launchWhenNextLifecycleEventStart<T>({bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

launchWhenNextLifecycleEventStop<T>({bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Future<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

makeLiveCancellable({Cancellable? other, bool weakRef = false}) → Cancellable

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

构建一个绑定到lifecycleCancellable *weakRef 是否是弱引用的 保持兼容性为 false 将在3.0版本改为 true
repeatOnLifecycle<T>({LifecycleState targetState = LifecycleState.started, bool runWithDelayed = false, bool ignoreBlockError = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) → void

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

当高于某个状态时执行给定的block
repeatOnLifecycleResumed<T>({bool runWithDelayed = false, bool ignoreBlockError = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) → void

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

repeatOnLifecycleStarted<T>({bool runWithDelayed = false, bool ignoreBlockError = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) → void

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleDestroy({Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleNextEvent(LifecycleEvent event, {bool runWithDelayed = false, Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleNextEventPause({bool runWithDelayed = false, Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleNextEventResume({bool runWithDelayed = true, Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleNextEventStart({bool runWithDelayed = false, Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleNextEventStop({bool runWithDelayed = false, Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleStateAtLeast(LifecycleState state, {bool runWithDelayed = false, Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleStateResumed({bool runWithDelayed = true, Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

whenLifecycleStateStarted({bool runWithDelayed = false, Cancellable? cancellable}) Future<Cancellable>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension