backgroundRadialGradient method

Widget backgroundRadialGradient({
  1. Key? key,
  2. AlignmentGeometry center = Alignment.center,
  3. double radius = 0.5,
  4. List<Color>? colors,
  5. List<double>? stops,
  6. TileMode tileMode = TileMode.clamp,
  7. AlignmentGeometry? focal,
  8. double focalRadius = 0.0,
  9. GradientTransform? transform,
  10. 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,
        );
}