withBrightness method

Color withBrightness(
  1. Brightness brightness
)

Implementation

Color withBrightness(Brightness brightness) {
  final self = this;
  if (self is CupertinoDynamicColor) {
    return brightness == Brightness.light ? self.color : self.darkColor;
  } else {
    return this;
  }
}