Hi, shouldn't this method be replaceable by the following simpler and more efficient code?
extension on Color {
Color withIncrement(int amount) =>
Color.fromRGBO(
(this.red + amount).clamp(0, 255), (this.green + amount).clamp(0, 255), (this.blue + amount).clamp(0, 255), 1
);
}
Or am I missing something?
Hi, shouldn't this method be replaceable by the following simpler and more efficient code?
Or am I missing something?