All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.moe.tlaster.precompose.navigation.route.FloatingRoute.kt Maven / Gradle / Ivy

Go to download

A third-party Jetbrains Compose library with ViewModel, LiveData and Navigation support.

There is a newer version: 1.7.0-alpha03
Show newest version
package moe.tlaster.precompose.navigation.route

import androidx.compose.animation.AnimatedContentScope
import androidx.compose.runtime.Composable
import moe.tlaster.precompose.navigation.BackStackEntry

internal class FloatingRoute(
    override val content: @Composable AnimatedContentScope.(BackStackEntry) -> Unit,
    override val route: String,
) : ComposeRoute, ComposeFloatingRoute

@Deprecated(
    message = """
    Used as a backwards compatible for the old RouteBuilder APIs which do not expect the content to
    be an extension function on AnimatedContentScope        
    """,
    level = DeprecationLevel.WARNING,
)
internal fun floatingRouteWithoutAnimatedContent(
    route: String,
    content: @Composable (BackStackEntry) -> Unit,
): FloatingRoute {
    return FloatingRoute(
        route = route,
        content = { entry -> content(entry) },
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy