LifecycleObserverRegistryCacnellable extension

on
  • ILifecycle

Methods

collectOnLifecycle<T>({LifecycleState targetState = LifecycleState.started, bool runWithDelayed = 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, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) Stream<T>

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

collectOnLifecycleStarted<T>({bool runWithDelayed = 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
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

makeLiveCancellable({Cancellable? other}) → Cancellable

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

构建一个绑定到lifecycle的Cancellable
repeatOnLifecycle<T>({LifecycleState targetState = LifecycleState.started, bool runWithDelayed = false, Cancellable? cancellable, required FutureOr<T> block(Cancellable cancellable)}) → void

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

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

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension

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

Available on ILifecycle, provided by the LifecycleObserverRegistryCacnellable extension