rename to appscaffold, remote simpleappbar

This commit is contained in:
2026-08-08 20:34:47 +03:00
parent f1d191c94d
commit 3962ec29da
16 changed files with 224 additions and 258 deletions
@@ -27,6 +27,7 @@ import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.TopAppBarScrollBehavior
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.Immutable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
@@ -80,35 +81,38 @@ fun <T : Route> AppScaffold(
content: @Composable (padding: PaddingValues) -> Unit,
) {
val windowType = currentWindowType()
MaterialExpressiveTheme(colorScheme = colorScheme) {
Scaffold(
bottomBar = {
if (windowType.isCompact) {
BottomBar(navigationEntries, currentRoute, onSelectNavigation)
}
},
topBar = {
appBar(scrollBehavior)
}, content = {
if (windowType.isExpanded && navigationEntries?.isNotEmpty() == true) {
ExpandedContent(
it,
navigationEntries,
currentRoute,
onSelectNavigation,
content
)
val blurState = rememberBlurState()
CompositionLocalProvider(LocalBlurState provides blurState) {
MaterialExpressiveTheme(colorScheme = colorScheme) {
Scaffold(
bottomBar = {
if (windowType.isCompact) {
BottomBar(navigationEntries, currentRoute, onSelectNavigation)
}
},
topBar = {
appBar(scrollBehavior)
}, content = {
if (windowType.isExpanded && navigationEntries?.isNotEmpty() == true) {
ExpandedContent(
it,
navigationEntries,
currentRoute,
onSelectNavigation,
content
)
} else {
content(it)
}
}, modifier = if (scrollBehavior != null) {
modifier.nestedScroll(scrollBehavior.nestedScrollConnection)
} else {
content(it)
modifier
}, snackbarHost = {
snackbarState?.let { SnackbarHost(it) }
}
}, modifier = if (scrollBehavior != null) {
modifier.nestedScroll(scrollBehavior.nestedScrollConnection)
} else {
modifier
}, snackbarHost = {
snackbarState?.let { SnackbarHost(it) }
}
)
)
}
}
}
@@ -117,8 +117,8 @@ fun ExpressiveLazyColumn(
item(key = node.key, contentType = node.contentType) {
ExpressiveCard(
topRadius = topRadius,
bottomRadius = bottomRadius,
topRadius = if (reverseLayout) bottomRadius else topRadius,
bottomRadius = if (reverseLayout) topRadius else bottomRadius,
horizontalPadding = horizontalPadding,
verticalSpacing = verticalSpacing,
modifier = Modifier.animateItem(
@@ -126,9 +126,7 @@ fun ExpressiveLazyColumn(
fadeOutSpec = spring(),
placementSpec = spring()
)
) {
node.content(this@item)
}
) { node.content(this@item) }
}
}
}