toPureBlack method

ColorScheme toPureBlack(
  1. bool isPureBlack
)

Implementation

ColorScheme toPureBlack(bool isPureBlack) {
  if (!isPureBlack || brightness != Brightness.dark) {
    return this;
  }
  final shift = surface.tone;
  Color lower(Color color) => color.shiftTone(-shift);

  return copyWith(
    surface: Colors.black,
    surfaceDim: Colors.black,
    surfaceContainerLowest: Colors.black,
    surfaceContainerLow: lower(surfaceContainerLow),
    surfaceContainer: lower(surfaceContainer),
    surfaceContainerHigh: lower(surfaceContainerHigh),
    surfaceContainerHighest: lower(surfaceContainerHighest),
    surfaceBright: lower(surfaceBright),
  );
}