withTint static method
tint_factor < 1.0
Implementation
static Color withTint(Color color, num tintFactor) {
var r = color.red + (255 - color.red) * tintFactor;
var g = color.green + (255 - color.green) * tintFactor;
var b = color.blue + (255 - color.blue) * tintFactor;
return Color.fromRGBO(r.toInt(), g.toInt(), b.toInt(), color.opacity);
}