All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dev.stateholder.extensions.CollectAsState.kt Maven / Gradle / Ivy

Go to download

A simple library for managing state in Kotlin Multiplatform projects, using Kotlin Coroutines and `StateFlow`.

There is a newer version: 1.2.0
Show newest version
package dev.stateholder.extensions

import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
import com.arkivanov.essenty.lifecycle.Lifecycle
import dev.stateholder.StateOwner
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext

@Composable
public expect fun  StateOwner.collectAsState(
    minActiveState: Lifecycle.State = Lifecycle.State.STARTED,
    context: CoroutineContext = EmptyCoroutineContext,
): State




© 2015 - 2024 Weber Informatics LLC | Privacy Policy