P0 step 4: the draw-vs-pan/zoom decision (single-pointer + device-kind + palm rejection + hardware-pan-button suppression) is lifted verbatim out of the PenCanvas StatefulWidget into pure functions in input/input_arbiter.dart, and pen_canvas now delegates _shouldDraw/_isStylus to them. Behavior-identical (same expressions), now decided by ONE unit-tested place. Adds test/input_arbiter_test.dart pinning the full truth table: stylus/mouse always draw, finger draws only with the toggle, >=2 pointers never draw (pinch owns it), hardware pan button suppresses, trackpad/unknown never draw. flutter analyze clean; 74/74 tests pass (+8). No live-path behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21 KiB
21 KiB