LifecycleResumePauseEffectScope


Receiver scope for LifecycleResumeEffect that offers the onPauseOrDispose clause to couple the ON_RESUME effect. This should be the last statement in any call to LifecycleResumeEffect.

This scope is also a LifecycleOwner to allow access to the (lifecycle)LifecycleResumePauseEffectScope.lifecycle within the onPauseOrDispose clause.

Summary

Public constructors

Cmn

Public functions

inline LifecyclePauseOrDisposeEffectResult
onPauseOrDispose(crossinline onPauseOrDisposeEffect: LifecycleOwner.() -> Unit)

Provide the onPauseOrDisposeEffect to the LifecycleResumeEffect to run when the observer receives an (ON_PAUSE)Lifecycle.Event.ON_PAUSE event or must undergo cleanup.

Cmn

Public properties

open Lifecycle

The lifecycle being observed by this receiver scope

Cmn

Public constructors

LifecycleResumePauseEffectScope

LifecycleResumePauseEffectScope(lifecycle: Lifecycle)
Parameters
lifecycle: Lifecycle

The lifecycle being observed by this receiver scope

Public functions

onPauseOrDispose

inline fun onPauseOrDispose(crossinline onPauseOrDisposeEffect: LifecycleOwner.() -> Unit): LifecyclePauseOrDisposeEffectResult

Provide the onPauseOrDisposeEffect to the LifecycleResumeEffect to run when the observer receives an (ON_PAUSE)Lifecycle.Event.ON_PAUSE event or must undergo cleanup.

Public properties

lifecycle

open val lifecycleLifecycle

The lifecycle being observed by this receiver scope