reduceAlpha function

Color reduceAlpha(
  1. Color color, {
  2. double amount = 0.1,
})

Decreases the alpha of the given color by the given amount.

Implementation

Color reduceAlpha(Color color, {double amount = 0.1}) {
  return color.withOpacity((color.opacity - amount).clamp(0.0, 1.0));
}