//reactivestate/com.ensody.reactivestate.android/onceStateAtLeast
onceStateAtLeast¶
[android]\ suspend fun <T> LifecycleOwner.onceStateAtLeast(state: Lifecycle.State, cancelWhenBelow: Boolean, block: suspend () -> T): T
Waits until the lifecycle reaches the given state and then runs block.
Parameters¶
android
cancelWhenBelow | Pass false to keep the coroutine running even if the state falls below state. |