drawDataMarker method Null safety

  1. @override
void drawDataMarker(
  1. int index,
  2. Canvas canvas,
  3. Paint fillPaint,
  4. Paint strokePaint,
  5. double pointX,
  6. double pointY,
  7. [CartesianSeriesRenderer? seriesRenderer]
)
override

Draws marker with different shape and color of the appropriate data point in the series.

Implementation

@override
void drawDataMarker(int index, Canvas canvas, Paint fillPaint,
    Paint strokePaint, double pointX, double pointY,
    [CartesianSeriesRenderer? seriesRenderer]) {
  final Size size =
      Size(_series.markerSettings.width, _series.markerSettings.height);
  final Path markerPath = _getMarkerShapesPath(
      _series.markerSettings.shape,
      Offset(pointX, pointY),
      size,
      seriesRenderer!,
      index,
      null,
      seriesRenderer._seriesElementAnimation,
      _segment);
  canvas.drawPath(markerPath, fillPaint);
  canvas.drawPath(markerPath, strokePaint);
}