copyWith method Null safety

SweepGradient copyWith(
  1. {List<Color>? colors,
  2. List<double>? stops,
  3. GradientTransform? transform,
  4. TileMode? tileMode,
  5. AlignmentGeometry? center,
  6. double? startAngle,
  7. double? endAngle}
)

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

Implementation

SweepGradient copyWith({
  List<Color>? colors,
  List<double>? stops,
  GradientTransform? transform,
  TileMode? tileMode,
  AlignmentGeometry? center,
  double? startAngle,
  double? endAngle,
}) =>
    SweepGradient(
      colors: colors ?? this.colors,
      stops: stops ?? this.stops,
      transform: transform ?? this.transform,
      tileMode: tileMode ?? this.tileMode,
      center: center ?? this.center,
      startAngle: startAngle ?? this.startAngle,
      endAngle: endAngle ?? this.endAngle,
    );