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