Custom user interactions: building a desktop drawing app
summary
A small desktop drawing app uses Flutter’s Shortcuts-Intents-Actions to wire keyboard commands to canvas operations, showing concrete fixes: use a lower BuildContext/Builder when calling actions.invoke, set Focus so traversal starts at the right node, and map platform keys with an adaptive shortcuts map. Editable text uses Actions.overridable, so default text intents can be overridden by app-level shortcuts, and web maps many keys to doNothingAndStopPropagation (browser input handles them). The final feature deletes characters while typing and deletes the mark only when the field is empty.
AI-written summary · about
chapters (11)
- 0:00Introduction to shortcuts
- 2:20The problem with callbacks
- 5:39Intents and actions system
- 8:39Demoing actions and focus
- 13:12Implementing shortcut widgets
- 16:30Traversing the widget tree
- 19:12Building the drawing app
- 22:54Overriding built-in behaviors
- 28:07Customizing textfield behavior
- 32:47Web platform caveats
- 37:52Final implementation and summary
related talks
30mHow to build a desktop widget kit for Flutter apps
17mLearn about Flutter desktop
15mBuilding a desktop design language with Flutter
13mBuilding platform adaptive apps
01h 15mCrafting OS-Level Experiences with Flutter Desktop
37mNo touch. No gestures. Can you still build a Great UX?
28mBuilding Design Tools with Flutter
47mFlutter - how to make a beautiful app in an hour?
