RangeAnnotation<D> constructor

RangeAnnotation<D>(
  1. List<AnnotationSegment<Object>> annotations, {
  2. Color? defaultColor,
  3. AnnotationLabelAnchor? defaultLabelAnchor,
  4. AnnotationLabelDirection? defaultLabelDirection,
  5. AnnotationLabelPosition? defaultLabelPosition,
  6. TextStyleSpec? defaultLabelStyleSpec,
  7. bool? extendAxis,
  8. int? labelPadding,
  9. double? defaultStrokeWidthPx,
  10. int? layoutPaintOrder,
})

Implementation

RangeAnnotation(this.annotations,
    {Color? defaultColor,
    AnnotationLabelAnchor? defaultLabelAnchor,
    AnnotationLabelDirection? defaultLabelDirection,
    AnnotationLabelPosition? defaultLabelPosition,
    TextStyleSpec? defaultLabelStyleSpec,
    bool? extendAxis,
    int? labelPadding,
    double? defaultStrokeWidthPx,
    int? layoutPaintOrder})
    : defaultColor = StyleFactory.style.rangeAnnotationColor,
      defaultLabelAnchor = defaultLabelAnchor ?? _defaultLabelAnchor,
      defaultLabelDirection = defaultLabelDirection ?? _defaultLabelDirection,
      defaultLabelPosition = defaultLabelPosition ?? _defaultLabelPosition,
      defaultLabelStyleSpec = defaultLabelStyleSpec ?? _defaultLabelStyle,
      extendAxis = extendAxis ?? true,
      labelPadding = labelPadding ?? _defaultLabelPadding,
      defaultStrokeWidthPx = defaultStrokeWidthPx ?? _defaultStrokeWidthPx,
      layoutPaintOrder =
          layoutPaintOrder ?? LayoutViewPaintOrder.rangeAnnotation {
  _lifecycleListener = LifecycleListener<D>(
      onPostprocess: _updateAxisRange, onAxisConfigured: _updateViewData);
}