scale method
Returns a new RadialGradient with its colors scaled by the given factor.
Since the alpha component of the Color is what is scaled, a factor of 0.0 or less results in a gradient that is fully transparent.
Implementation
@override
RadialGradient scale(double factor) {
return RadialGradientPainter(
center: center,
radius: radius,
colors: colors
.map<Color>((Color color) => Color.lerp(null, color, factor)!)
.toList(),
stops: stops,
tileMode: tileMode,
focal: focal,
focalRadius: focalRadius,
transform: transform,
colorSpace: colorSpace,
density: density,
);
}