CSSLinearGradient constructor

CSSLinearGradient({
  1. Alignment begin = Alignment.centerLeft,
  2. Alignment end = Alignment.centerRight,
  3. double? angle,
  4. double? repeatPeriod,
  5. required List<Color> colors,
  6. List<double>? stops,
  7. TileMode tileMode = TileMode.clamp,
  8. 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 super.begin,
  Alignment super.end,
  double? angle,
  double? repeatPeriod,
  required super.colors,
  // A list of values from 0.0 to 1.0 that denote fractions along the gradient.
  super.stops,
  super.tileMode,
  super.transform,
})  : _angle = angle,
      _repeatPeriod = repeatPeriod;