commonMain.tech.skot.core.components.SKRootStack.kt Maven / Gradle / Ivy
package tech.skot.core.components
import tech.skot.core.di.coreViewInjector
object SKRootStack:SKStack() {
override val view = coreViewInjector.rootStack()
fun resetToRoot() {
state.screens.firstOrNull()?.removeAllScreensOnTop()
}
val screenOnTop: SKScreen<*>?
get() = state.screens.lastOrNull()
}