withOpacity method
- double opacity
override
Returns a new Gradient with each color set to the given opacity.
Implementation
@override
RadialGradient withOpacity(double opacity) {
return RadialGradient(
center: center,
radius: radius,
colors: <Color>[
for (final Color color in colors) color.withOpacity(opacity)
],
stops: stops,
tileMode: tileMode,
focal: focal,
focalRadius: focalRadius,
transform: transform,
);
}