Skip to content

Commit

Permalink
Expose layoutType just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
boswelja committed Nov 17, 2024
1 parent b2187d3 commit 810e482
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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(
Expand Down

0 comments on commit 810e482

Please sign in to comment.