Skip to content

Instantly share code, notes, and snippets.

@skydoves
Created June 27, 2022 01:32
Show Gist options
  • Save skydoves/aaaf2895138ac68973ba54ddc6e87519 to your computer and use it in GitHub Desktop.
Save skydoves/aaaf2895138ac68973ba54ddc6e87519 to your computer and use it in GitHub Desktop.
adaptive_layout
Scaffold(
modifier = Modifier,
containerColor = Color.Transparent,
bottomBar = {
if (windowSizeClass.widthSizeClass == WindowWidthSizeClass.Compact) {
NiABottomBar(
onNavigateToTopLevelDestination = niaTopLevelNavigation::navigateTo,
currentDestination = currentDestination
)
}
}
) { padding -> {
..
if (windowSizeClass.widthSizeClass != WindowWidthSizeClass.Compact) {
NiANavRail(
onNavigateToTopLevelDestination = niaTopLevelNavigation::navigateTo,
currentDestination = currentDestination,
modifier = Modifier.safeDrawingPadding()
)
}
..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment