copyWith method

VerticalRangeAnnotation copyWith({
  1. double? x1,
  2. double? x2,
  3. Color? color,
  4. Gradient? gradient,
})

Copies current VerticalRangeAnnotation to a new VerticalRangeAnnotation, and replaces provided values.

Implementation

VerticalRangeAnnotation copyWith({
  double? x1,
  double? x2,
  Color? color,
  Gradient? gradient,
}) {
  return VerticalRangeAnnotation(
    x1: x1 ?? this.x1,
    x2: x2 ?? this.x2,
    color: color ?? this.color,
    gradient: gradient ?? this.gradient,
  );
}