LinearShadedSteps constructor Null safety

const LinearShadedSteps(
  1. {ColorArithmetic shadeFunction = Shades.withWhite,
  2. double shadeFactor = -90,
  3. double distance = 0.6,
  4. double softness = 0.0,
  5. required List<Color> colors,
  6. List<double>? stops,
  7. AlignmentGeometry begin = Alignment.centerLeft,
  8. AlignmentGeometry end = Alignment.centerRight,
  9. TileMode tileMode = TileMode.clamp,
  10. GradientTransform? transform}
)

A standard Steps gradient differs from the average 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.

This LinerShadedSteps evolves LinearSteps one step further by creating the "stepping" effect across four colors/stops entries instead of only two. This allows greater control over the inner appearance of each given step; "shading" it darker or "shading" it more transparent, for example, in accordance with shadeFunction.

The default shadeFunction is Shades.withWhite and the default shadeFactor is -90. In this default scenario, each step will transition from color to color.withwhite(-90).

The distance, defaulting at 0.6 is a percentage between the start and end of each step color to begin transitioning toward the color value with shadeFunction applied to it.

See LinearSteps for more information.

Implementation

const LinearShadedSteps({
  this.shadeFunction = Shades.withWhite,
  this.shadeFactor = -90,
  this.distance = 0.6,
  double softness = 0.0,
  required List<Color> colors,
  List<double>? stops,
  AlignmentGeometry begin = Alignment.centerLeft,
  AlignmentGeometry end = Alignment.centerRight,
  TileMode tileMode = TileMode.clamp,
  GradientTransform? transform,
}) : super(
        softness: softness,
        colors: colors,
        stops: stops,
        begin: begin,
        end: end,
        tileMode: tileMode,
        transform: transform,
      );