copyWith method

LinearGradient copyWith({
  1. List<Color>? colors,
  2. List<double>? stops,
  3. GradientTransform? transform,
  4. TileMode? tileMode,
  5. AlignmentGeometry? begin,
  6. AlignmentGeometry? end,
})

📋 Returns a new copy of this LinearGradient with any provided optional parameters overriding those of this.

Implementation

LinearGradient copyWith({
  List<Color>? colors,
  List<double>? stops,
  GradientTransform? transform,
  TileMode? tileMode,
  AlignmentGeometry? begin,
  AlignmentGeometry? end,
}) =>
    LinearGradient(
      colors: colors ?? this.colors,
      stops: stops ?? this.stops,
      transform: transform ?? this.transform,
      tileMode: tileMode ?? this.tileMode,
      begin: begin ?? this.begin,
      end: end ?? this.end,
    );