commonMain.dev.programadorthi.routing.compose.ComposeContent.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compose Show documentation
Show all versions of compose Show documentation
An extensible and multiplatform routing system powered by Ktor
package dev.programadorthi.routing.compose
import androidx.compose.runtime.Composable
import dev.programadorthi.routing.core.application.ApplicationCall
import io.ktor.util.AttributeKey
internal typealias ComposeContent = @Composable (ApplicationCall) -> Unit
private val ComposeRoutingContentAttributeKey: AttributeKey =
AttributeKey("ComposeRoutingContentAttributeKey")
internal var ApplicationCall.content: ComposeContent?
get() = attributes.getOrNull(ComposeRoutingContentAttributeKey)
set(value) {
if (value != null) {
attributes.put(ComposeRoutingContentAttributeKey, value)
} else {
attributes.remove(ComposeRoutingContentAttributeKey)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy