copyWith method

HorizontalRangeAnnotation copyWith({
  1. double? y1,
  2. double? y2,
  3. Color? color,
  4. Gradient? gradient,
})

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

Implementation

HorizontalRangeAnnotation copyWith({
  double? y1,
  double? y2,
  Color? color,
  Gradient? gradient,
}) {
  return HorizontalRangeAnnotation(
    y1: y1 ?? this.y1,
    y2: y2 ?? this.y2,
    color: color ?? this.color,
    gradient: gradient ?? this.gradient,
  );
}