commonMain.ru.alexgladkov.odyssey.compose.helpers.FlowBuilderModel.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odyssey-compose Show documentation
Show all versions of odyssey-compose Show documentation
Lightweight multiplatform navigation library (jvm, android, ios)
package ru.alexgladkov.odyssey.compose.helpers
import ru.alexgladkov.odyssey.compose.AllowedDestination
import ru.alexgladkov.odyssey.compose.RenderWithParams
import ru.alexgladkov.odyssey.compose.ScreenType
data class FlowBuilderModel(
val key: String,
val allowedDestination: List,
val screenMap: HashMap>
)
class FlowBuilder(val name: String) {
private val _screenMap: HashMap> = hashMapOf()
private val _allowedDestinations: MutableList = mutableListOf()
fun addScreen(name: String, content: RenderWithParams) {
_allowedDestinations.add(AllowedDestination(key = name, screenType = ScreenType.Simple))
_screenMap[name] = content
}
fun build(): FlowBuilderModel {
return FlowBuilderModel(
key = name,
screenMap = _screenMap,
allowedDestination = _allowedDestinations
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy