overlayColor static method

Color overlayColor(
  1. BuildContext context,
  2. double elevation

Computes the appropriate overlay color used to indicate elevation in dark themes.

If using Material Design 3, this type of color overlay is no longer used. Instead a "surface tint" overlay is used instead. See applySurfaceTint, ThemeData.useMaterial3 for more information.

See also:


static Color overlayColor(BuildContext context, double elevation) {
  final ThemeData theme = Theme.of(context);
  return _overlayColor(theme.colorScheme.onSurface, elevation);