copyWith method
Returns a copy of this color modified with the provided values.
Implementation
@override
HsbColor copyWith({
num? hue,
num? saturation,
num? brightness,
int? alpha,
}) {
assert(hue == null || (hue >= 0 && hue <= 360));
assert(saturation == null || (saturation >= 0 && saturation <= 100));
assert(brightness == null || (brightness >= 0 && brightness <= 100));
assert(alpha == null || (alpha >= 0 && alpha <= 255));
return HsbColor(
hue ?? this.hue,
saturation ?? this.saturation,
brightness ?? this.brightness,
alpha ?? this.alpha,
);
}