CSSLinearGradient constructor

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

Creates a linear gradient.

The colors argument must not be null. If stops is non-null, it must have the same length as colors.

Implementation

CSSLinearGradient({
  Alignment begin = Alignment.centerLeft,
  Alignment end = Alignment.centerRight,
  double? angle,
  required List<Color> colors,
  // A list of values from 0.0 to 1.0 that denote fractions along the gradient.
  List<double>? stops,
  TileMode tileMode = TileMode.clamp,
  GradientTransform? transform,
}) : _angle = angle,
      super(begin: begin, end: end, colors: colors, stops: stops, tileMode: tileMode, transform: transform);