M3 Overhaul
This commit is contained in:
@@ -597,7 +597,7 @@ class _DesktopTableViewState<T> extends State<_DesktopTableView<T>> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Mobile tile wrapper that applies Material 2 style elevation.
|
||||
/// Mobile tile wrapper that applies M3 Expressive tonal elevation.
|
||||
class _MobileTile<T> extends StatelessWidget {
|
||||
const _MobileTile({
|
||||
required this.item,
|
||||
@@ -615,21 +615,14 @@ class _MobileTile<T> extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final tile = mobileTileBuilder(context, item, actions);
|
||||
|
||||
// Apply Material 2 style elevation for Cards (per Hybrid M3/M2 guidelines).
|
||||
// Mobile tiles deliberately use a slightly smaller corner radius for
|
||||
// compactness, but they should inherit the global card elevation and
|
||||
// shadow color from the theme to maintain visual consistency.
|
||||
// M3 Expressive: cards use tonal surface tints. The theme's CardThemeData
|
||||
// already specifies surfaceTintColor and low elevation. We apply the
|
||||
// compact shape for list density.
|
||||
if (tile is Card) {
|
||||
final themeCard = Theme.of(context).cardTheme;
|
||||
return Card(
|
||||
color: tile.color,
|
||||
elevation: themeCard.elevation ?? 3,
|
||||
margin: tile.margin,
|
||||
// prefer the tile's explicit shape. For mobile tiles we intentionally
|
||||
// use the compact radius token so list items feel denser while
|
||||
// remaining theme-driven.
|
||||
shape: tile.shape ?? AppSurfaces.of(context).compactShape,
|
||||
shadowColor: AppSurfaces.of(context).compactShadowColor,
|
||||
clipBehavior: tile.clipBehavior,
|
||||
child: tile.child,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user