withValueOpacity method

Color withValueOpacity(
  1. double opacity
)

Implementation

Color withValueOpacity(double opacity) {
  assert(opacity >= 0.0 && opacity <= 1.0);
  return withAlpha((255.0 * opacity).round());
}