Created App Surfaces for Theming
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:math' as math;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme/app_typography.dart';
|
||||
import '../theme/app_surfaces.dart';
|
||||
import 'mono_text.dart';
|
||||
|
||||
/// A column configuration for the [TasQAdaptiveList] desktop table view.
|
||||
@@ -306,13 +307,21 @@ 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)
|
||||
// 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.
|
||||
if (tile is Card) {
|
||||
final themeCard = Theme.of(context).cardTheme;
|
||||
return Card(
|
||||
color: tile.color,
|
||||
elevation: 2,
|
||||
elevation: themeCard.elevation ?? 3,
|
||||
margin: tile.margin,
|
||||
shape: tile.shape,
|
||||
// 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