LinearGradient constructor

const LinearGradient({AlignmentGeometry begin: Alignment.centerLeft, AlignmentGeometry end: Alignment.centerRight, @required List<Color> colors, List<double> stops, TileMode tileMode: TileMode.clamp })

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,
}) : assert(begin != null),
     assert(end != null),
     assert(tileMode != null),
     super(colors: colors, stops: stops);