brighten function
Brighten a color
by percent
Implementation
Color brighten(Color color, double percent) {
assert(percent <= 100, 'Brighten percent should not be greater than 100');
final strength = percent / 100;
return Color.fromARGB(
color.alpha,
color.red + ((255 - color.red) * strength).round(),
color.green + ((255 - color.green) * strength).round(),
color.blue + ((255 - color.blue) * strength).round(),
);
}