clearAnnotationCanvas method

void clearAnnotationCanvas()

Clear the annotation canvas.

Implementation

void clearAnnotationCanvas() {
  final ctx = _annotationCanvas?.context2D;
  if (ctx == null || _annotationCanvas == null) return;

  ctx.clearRect(
    0,
    0,
    _annotationCanvas!.width.toDouble(),
    _annotationCanvas!.height.toDouble(),
  );
}