withOpacityX method

Color withOpacityX(
  1. double opacity
)

Implementation

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