clear method

void clear()

Clear the entire drawing.

Implementation

void clear() {
  value = switch (value) {
    final Drawing d => d.copyWith(
        sketch: const Sketch(lines: []),
        activeLine: null,
      ),
    final Erasing e => e.copyWith(
        sketch: const Sketch(lines: []),
      ),
  };
}