commonMain.dev.datlag.tooling.decompose.lifecycle.LocalLifecycleOwner.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tooling-decompose Show documentation
Show all versions of tooling-decompose Show documentation
Kotlin multiplatform tooling library.
package dev.datlag.tooling.decompose.lifecycle
import androidx.compose.runtime.compositionLocalOf
import com.arkivanov.essenty.lifecycle.Lifecycle
import com.arkivanov.essenty.lifecycle.LifecycleOwner
import com.arkivanov.essenty.lifecycle.LifecycleRegistry
/**
* [LifecycleOwner] holder to use [collectAsStateWithLifecycle].
*/
val LocalLifecycleOwner = compositionLocalOf {
object : LifecycleOwner {
override val lifecycle: Lifecycle = LifecycleRegistry()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy