addOpacity method

Color addOpacity([
  1. double value = 0.5
])

Makes the current color more transparent, by the given value, from 0 (total transparency) to 1 (no change). If value is not provided, it will be 0.5 (50% change). If value is less than 0, it's 0. If more than 1, it's 1. Makes it more transparent if percent < 1.

Implementation

Color addOpacity([double value = 0.5]) =>
    Color.fromARGB((alpha * _limit(value)).round(), red, green, blue);