copyWith method

RangeAnnotations copyWith({
  1. List<HorizontalRangeAnnotation>? horizontalRangeAnnotations,
  2. List<VerticalRangeAnnotation>? verticalRangeAnnotations,
})

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

Implementation

RangeAnnotations copyWith({
  List<HorizontalRangeAnnotation>? horizontalRangeAnnotations,
  List<VerticalRangeAnnotation>? verticalRangeAnnotations,
}) {
  return RangeAnnotations(
    horizontalRangeAnnotations:
        horizontalRangeAnnotations ?? this.horizontalRangeAnnotations,
    verticalRangeAnnotations:
        verticalRangeAnnotations ?? this.verticalRangeAnnotations,
  );
}