copyWith method

LineOptions copyWith({
  1. double? strokeWidth,
  2. Color? color,
  3. double? borderStrokeWidth,
  4. Color? borderColor,
  5. List<Color>? gradientColors,
  6. List<double>? colorsStop,
  7. bool? isDotted,
  8. StrokeCap? strokeCap,
  9. StrokeJoin? strokeJoin,
  10. bool? useStrokeWidthInMeter,
})

Creates a copy of this LineOptions object with optional overrides.

Implementation

LineOptions copyWith({
  double? strokeWidth,
  Color? color,
  double? borderStrokeWidth,
  Color? borderColor,
  List<Color>? gradientColors,
  List<double>? colorsStop,
  bool? isDotted,
  StrokeCap? strokeCap,
  StrokeJoin? strokeJoin,
  bool? useStrokeWidthInMeter,
}) {
  return LineOptions(
    strokeWidth: strokeWidth ?? this.strokeWidth,
    color: color ?? this.color,
    borderStrokeWidth: borderStrokeWidth ?? this.borderStrokeWidth,
    borderColor: borderColor ?? this.borderColor,
    gradientColors: gradientColors ?? this.gradientColors,
    colorsStop: colorsStop ?? this.colorsStop,
    isDotted: isDotted ?? this.isDotted,
    strokeCap: strokeCap ?? this.strokeCap,
    strokeJoin: strokeJoin ?? this.strokeJoin,
    useStrokeWidthInMeter:
        useStrokeWidthInMeter ?? this.useStrokeWidthInMeter,
  );
}