void clear()

Clear all previously added graphics commands.

Source

void clear() {
  for (var c in _originalCommands) {
    c._setGraphics(null);
  }
  _originalCommands.clear();
  _invalidate();
}