Skip to content

Instantly share code, notes, and snippets.

@mohanmanu484
Created May 28, 2024 09:52
Show Gist options
  • Save mohanmanu484/fbd7fec2078e4d01b94be1172afb5da0 to your computer and use it in GitHub Desktop.
Save mohanmanu484/fbd7fec2078e4d01b94be1172afb5da0 to your computer and use it in GitHub Desktop.
fun NavGraphBuilder.composable(
routeProvider: RouteProvider,
content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit
) {
composable(
route = routeProvider.route,
arguments = routeProvider.arguments,
deepLinks = routeProvider.deeplink,
content = content
)
}
fun NavHostController.navigate(navigation: Navigation) {
navigate(navigation.getRoute())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment