新增登录
This commit is contained in:
@@ -64,14 +64,14 @@ sealed class NavigationRoute(
|
||||
|
||||
|
||||
@Composable
|
||||
fun NavigationController(navController: NavHostController) {
|
||||
fun NavigationController(navController: NavHostController,startDestination: String = NavigationRoute.Login.route) {
|
||||
val navigationBarHeight = with(LocalDensity.current) {
|
||||
WindowInsets.navigationBars.getBottom(this).toDp()
|
||||
}
|
||||
|
||||
NavHost(
|
||||
navController = navController,
|
||||
startDestination = NavigationRoute.Index.route,
|
||||
startDestination = startDestination,
|
||||
) {
|
||||
composable(route = NavigationRoute.Index.route) {
|
||||
CompositionLocalProvider(
|
||||
@@ -170,7 +170,7 @@ fun NavigationController(navController: NavHostController) {
|
||||
|
||||
@OptIn(ExperimentalSharedTransitionApi::class)
|
||||
@Composable
|
||||
fun Navigation() {
|
||||
fun Navigation(startDestination: String = NavigationRoute.Login.route) {
|
||||
val navController = rememberNavController()
|
||||
SharedTransitionLayout {
|
||||
CompositionLocalProvider(
|
||||
@@ -178,7 +178,7 @@ fun Navigation() {
|
||||
LocalSharedTransitionScope provides this@SharedTransitionLayout,
|
||||
) {
|
||||
Box {
|
||||
NavigationController(navController = navController)
|
||||
NavigationController(navController = navController,startDestination = startDestination)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user