commonMain.captain.RoutesBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of captain-router-compose-core Show documentation
Show all versions of captain-router-compose-core Show documentation
A compose router that follows any type of navigator
@file:Suppress("NOTHING_TO_INLINE")
package captain
import androidx.compose.runtime.Composable
import kiota.Url
import kollections.List
import kollections.add
import kollections.mutableListOf
class RoutesBuilder internal constructor() {
@PublishedApi
internal val options = mutableListOf>()
}
inline fun RoutesBuilder.Route(path: String, noinline content: @Composable (params: List) -> Unit) {
options.add(RouteConfig(Url(path), content))
}