Package-level declarations
Functions
Link copied to clipboard
fun <T> MutableStateFlow<T>.collectAsMutableStateWithLifecycle(lifecycle: Lifecycle, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, context: CoroutineContext = EmptyCoroutineContext): MutableState<T>
fun <T> MutableStateFlow<T>.collectAsMutableStateWithLifecycle(lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, context: CoroutineContext = EmptyCoroutineContext): MutableState<T>
fun <T> MutableStateFlow<T>.collectAsMutableStateWithLifecycle(initialValue: T, lifecycle: Lifecycle, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, context: CoroutineContext = EmptyCoroutineContext): MutableState<T>
fun <T> MutableStateFlow<T>.collectAsMutableStateWithLifecycle(initialValue: T, lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, context: CoroutineContext = EmptyCoroutineContext): MutableState<T>
Converts this MutableStateFlow to a MutableState.
Link copied to clipboard
inline fun <VM : ViewModel> viewModel(viewModelStoreOwner: ViewModelStoreOwner = checkNotNull(LocalViewModelStoreOwner.current) {
"No ViewModelStoreOwner was provided via LocalViewModelStoreOwner"
}, key: String? = null, crossinline provider: () -> VM): VM
Returns an existing ViewModel or creates a new one in the given owner (usually, a fragment or an activity), defaulting to the owner provided by LocalViewModelStoreOwner.