radialGradient static method

Gradient radialGradient(
  1. List<Color> colors, {
  2. AlignmentGeometry? center,
  3. double radius = 0.5,
  4. List<double>? stops,
  5. TileMode mode = TileMode.clamp,
})

Creates a radial gradient with the specified colors and optional center, radius, stops, and tile mode parameters.

colors: A list of colors to be used in the radial gradient. center: The center point of the gradient. Default is center (0.5, 0.5). radius: The radius of the radial gradient. Default is 0.5. stops: A list of positions for each color stop. Default is evenly distributed. mode: The tile mode that defines how the gradient is repeated. Default is TileMode.clamp.

Returns a RadialGradient instance.

Implementation

static Gradient radialGradient(List<Color> colors,
    {AlignmentGeometry? center,
    double radius = 0.5,
    List<double>? stops,
    TileMode mode = TileMode.clamp}) {
  return RadialGradient(
      colors: colors,
      center: center ?? const Alignment(0.5, 0.5),
      radius: radius,
      stops: stops,
      tileMode: mode);
}