cancel method
Every cancel path (Escape with a shape pending never happens here; a switch to another tool, the layer's deactivate and dispose) clears the notice and the preview (R-29).
Implementation
@override
void cancel(ToolContext ctx) {
_preview = const [];
if (!_disposed) _notice.value = null;
super.cancel(ctx);
}