clearShapes method

void clearShapes({
  1. Duration? at,
})

Removes every drawing, or only those visible at at.

Implementation

void clearShapes({Duration? at}) {
  bool matches(UDocShape shape) => at == null || shape.visibleAt(at);
  if (!_shapes.any(matches)) return;
  _checkpoint();
  _shapes.removeWhere(matches);
  _commit();
}