backgroundSweepGradient method
Implementation
Widget backgroundSweepGradient({
Key? key,
AlignmentGeometry center = Alignment.center,
double startAngle = 0.0,
double endAngle = pi * 2,
List<Color>? colors,
List<double>? stops,
TileMode tileMode = TileMode.clamp,
GradientTransform? transform,
bool animate = false,
}) {
BoxDecoration decoration = BoxDecoration(
gradient: SweepGradient(
center: center,
startAngle: startAngle,
endAngle: endAngle,
colors: colors ?? [],
stops: stops,
tileMode: tileMode,
transform: transform,
),
);
return animate
? _StyledAnimatedBuilder(
key: key,
builder: (animation) {
return _AnimatedDecorationBox(
child: this,
decoration: decoration,
duration: animation.duration,
curve: animation.curve,
);
},
)
: DecoratedBox(
key: key,
child: this,
decoration: decoration,
);
}