LinearGradient constructor

const LinearGradient(
  1. {AlignmentGeometry begin = Alignment.centerLeft,
  2. AlignmentGeometry end = Alignment.centerRight,
  3. required List<Color> colors,
  4. List<double>? stops,
  5. TileMode tileMode = TileMode.clamp,
  6. 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.


const LinearGradient({
  this.begin = Alignment.centerLeft,
  this.end = Alignment.centerRight,
  required super.colors,
  this.tileMode = TileMode.clamp,