dispose method

void dispose()

To dispose the objects.

Implementation

void dispose() {
  points.clear();
  fillPaint.shader?.dispose();
  strokePaint.shader?.dispose();
}