midAnnotations property

  1. @JsonKey(includeToJson: false, includeFromJson: false)
List<Annotation> get midAnnotations

Implementation

@JsonKey(includeToJson: false, includeFromJson: false)
List<Annotation> get midAnnotations => annotationsSorted
    .where((a) => a.value != minimum && a.value != maximum)
    .toList();
set midAnnotations (List<Annotation> annotations)

Implementation

set midAnnotations(List<Annotation> annotations) {
  final prevMinAnnotation = minAnnotation;
  final prevMaxAnnotation = maxAnnotation;

  final List<Annotation> newAnnotations = [];
  if (prevMinAnnotation != null) {
    newAnnotations.add(prevMinAnnotation);
  }
  newAnnotations.addAll(annotations);
  if (prevMaxAnnotation != null) {
    newAnnotations.add(prevMaxAnnotation);
  }

  this.annotations = newAnnotations;
}