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.

Implementation

const LinearGradient({
  this.begin = Alignment.centerLeft,
  this.end = Alignment.centerRight,
  @required List<Color> colors,
  List<double> stops,
  this.tileMode = TileMode.clamp,
  GradientTransform transform,
}) : assert(begin != null),
     assert(end != null),
     assert(tileMode != null),
     super(colors: colors, stops: stops, transform: transform);