diff --git a/navigation/src/main/kotlin/com/imashnake/animite/navigation/NavigationScaffold.kt b/navigation/src/main/kotlin/com/imashnake/animite/navigation/NavigationScaffold.kt index 2a1bbc76..de94c842 100644 --- a/navigation/src/main/kotlin/com/imashnake/animite/navigation/NavigationScaffold.kt +++ b/navigation/src/main/kotlin/com/imashnake/animite/navigation/NavigationScaffold.kt @@ -1,6 +1,9 @@ package com.imashnake.animite.navigation +import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteScaffold +import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteScaffoldDefaults +import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteType import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier @@ -11,10 +14,13 @@ import androidx.navigation.compose.currentBackStackEntryAsState fun NavigationScaffold( navController: NavHostController, modifier: Modifier = Modifier, + layoutType: NavigationSuiteType = + NavigationSuiteScaffoldDefaults.calculateFromAdaptiveInfo(currentWindowAdaptiveInfo()), content: @Composable () -> Unit ) { val currentBackStackEntry by navController.currentBackStackEntryAsState() NavigationSuiteScaffold( + layoutType = layoutType, navigationSuiteItems = { NavigationBarPaths.entries.forEach { destination -> item(