LinearSteps constructor Null safety

const LinearSteps(
  1. {double softness = 0.001,
  2. required List<Color> colors,
  3. List<double>? stops,
  4. AlignmentGeometry begin = Alignment.centerLeft,
  5. AlignmentGeometry end = Alignment.centerRight,
  6. TileMode tileMode = TileMode.clamp,
  7. GradientTransform? transform}

A Steps gradient differs from a standard Gradient in its progression from one color to the next. Instead of smoothly transitioning between colors, Steps have hard edges created by duplicating colors and stops.

A larger softness makes this LinearSteps more like a standard LinearGradient. Default is 0.001. High-resolution displays are well-suited for displaying the non-anti-aliased Steps formed when softness == 0.0.

See Steps for more information.


const LinearSteps({
  double softness = 0.001,
  required List<Color> colors,
  List<double>? stops,
  this.begin = Alignment.centerLeft,
  this.end = Alignment.centerRight,
  TileMode tileMode = TileMode.clamp,
  GradientTransform? transform,
}) : super(
        softness: softness,
        colors: colors,
        stops: stops,
        tileMode: tileMode,
        transform: transform,