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