backgroundRadialGradient method
Widget
backgroundRadialGradient({
- Key? key,
- AlignmentGeometry center = Alignment.center,
- double radius = 0.5,
- List<
Color> ? colors, - List<
double> ? stops, - TileMode tileMode = TileMode.clamp,
- AlignmentGeometry? focal,
- double focalRadius = 0.0,
- GradientTransform? transform,
- bool animate = false,
Implementation
Widget backgroundRadialGradient({
Key? key,
AlignmentGeometry center = Alignment.center,
double radius = 0.5,
List<Color>? colors,
List<double>? stops,
TileMode tileMode = TileMode.clamp,
AlignmentGeometry? focal,
double focalRadius = 0.0,
GradientTransform? transform,
bool animate = false,
}) {
BoxDecoration decoration = BoxDecoration(
gradient: RadialGradient(
center: center,
radius: radius,
colors: colors ?? [],
stops: stops,
tileMode: tileMode,
focal: focal,
focalRadius: focalRadius,
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,
);
}