withBrightness property

Color withBrightness

Get the color with brightness of the current color

Implementation

Color get withBrightness {
  final Brightness brightness =
      WidgetsBinding.instance.platformDispatcher.platformBrightness;
  if (brightness == Brightness.light) {
    return this;
  } else {
    return getMaterialColorValues[800]!;
  }
}