Skip to content

Instantly share code, notes, and snippets.

@DDihanov
Created December 4, 2020 14:28
Show Gist options
  • Save DDihanov/2be8e88b6ca9e24511712595c2cd191b to your computer and use it in GitHub Desktop.
Save DDihanov/2be8e88b6ca9e24511712595c2cd191b to your computer and use it in GitHub Desktop.
class Navigator {
lateinit var navController: NavController
fun navigateToFlow(navigationFlow: NavigationFlow) = when (navigationFlow) {
NavigationFlow.HomeFlow -> navController.navigate(MainNavGraphDirections.actionGlobalHomeFlow())
NavigationFlow.DashboardFlow -> navController.navigate(MainNavGraphDirections.actionGlobalDashboardFlow())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment