linearGradient method

void linearGradient({
  1. AlignmentGeometry begin = Alignment.centerLeft,
  2. AlignmentGeometry end = Alignment.centerRight,
  3. required List<Color> colors,
  4. TileMode tileMode = TileMode.clamp,
  5. List<double>? stops,
})
inherited

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

void linearGradient(
    {AlignmentGeometry begin = Alignment.centerLeft,
    AlignmentGeometry end = Alignment.centerRight,
    required List<Color> colors,
    TileMode tileMode = TileMode.clamp,
    List<double>? stops}) {
  _styleModel.gradient = LinearGradient(
      begin: begin,
      end: end,
      colors: colors,
      tileMode: tileMode,
      stops: stops);
}