RangeAnnotation<D> constructor

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

Implementation

RangeAnnotation(
  this.annotations, {
  AnnotationLabelAnchor? defaultLabelAnchor,
  AnnotationLabelDirection? defaultLabelDirection,
  AnnotationLabelPosition? defaultLabelPosition,
  TextStyleSpec? defaultLabelStyleSpec,
  bool? extendAxis,
  int? labelPadding,
  double? defaultStrokeWidthPx,
  int? layoutPaintOrder,
  Color? defaultColor,
})  : defaultColor = 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,
  );
}