getSurfaceTintColor method

Color getSurfaceTintColor(
  1. BuildContext context
)

Implementation

Color getSurfaceTintColor(BuildContext context) {
  final themeBloc = BlocProvider.of<FastThemeBloc>(context);
  final brightness = themeBloc.currentState.brightness;
  final palette = ThemeHelper.getPaletteColors(context);
  final isBrightnessLight = brightness == Brightness.light;
  final grayPalette = palette.gray;
  const opacity = 0.5;

  return isBrightnessLight
      ? grayPalette.lighter.withOpacity(opacity)
      : grayPalette.darker.withOpacity(opacity);
}