ambient static method
Neutral ambient elevation (no color tint) for content surfaces.
Implementation
static List<BoxShadow> ambient({
required bool isDark,
double level = 1.0,
Offset direction = const Offset(0, 1),
}) {
final dy = direction.dy;
final dx = direction.dx;
return [
BoxShadow(
color: Colors.black.withValues(alpha: (isDark ? 0.20 : 0.05) * level),
offset: Offset(dx * 1, dy * 2),
blurRadius: 6 * level,
),
BoxShadow(
color: Colors.black.withValues(alpha: (isDark ? 0.35 : 0.08) * level),
offset: Offset(dx * 8, dy * 16),
blurRadius: 32 * level,
spreadRadius: -8 * level,
),
];
}