Open GROOVIZ opened 3 years ago
The current implementation does not update the brightness of HSB colors:
@override HsbColor withBrightness(num value) { assert(value != null && value >= 0 && value <= 100); return HsbColor(hue, saturation, brightness, alpha); }
I changed it to follow what you did on other withXYZ methods, i.e. shadowing the instance variable:
withXYZ
@override HsbColor withBrightness(num brightness) { assert(brightness!= null && brightness>= 0 && brightness<= 100); return HsbColor(hue, saturation, brightness, alpha); }
A better solution could be to use value for the incoming parameter:
value
@override HsbColor withBrightness(num value) { assert(value != null && value >= 0 && value <= 100); return HsbColor(hue, saturation, value, alpha); }
Fix provided in https://github.com/james-alex/flutter_color_models/pull/1
The current implementation does not update the brightness of HSB colors:
I changed it to follow what you did on other
withXYZ
methods, i.e. shadowing the instance variable:A better solution could be to use
value
for the incoming parameter: