Using FocusableControlBuilder you can quickly create a new control that will work properly on all platforms and input devices.
Working "properly" entails support for:
tab key traversal
focus / rollover states
modified mouse cursor
support for keyboard shortcuts (Enter/Space by default)
Under the hood, this builder wraps the built in FocusableActionDetector and you can read there for more details about how it all works.
For more information on why you'd use these widgets, see this blog post:
https://blog.gskinner.com/archives/2021/06/flutter-building-custom-components-with-focusableactiondetector.html
FocusableControlBuilder will assume you want a "hand" cursor for your control, which is typically the case. If you'd like a different cursor, just assign it:
FocusableControlBuilder will create a default activation action which handles [Submit] and [Enter] keys. To create custom keyboard shortcuts you can set the .shortcuts and .actions parameters. This is a bit beyond the scope of this doc, but if you'd like to learn how, checkout the FocusableActionDetector docs which contain an example.
🐞 Bugs/Requests
If you encounter any problems please open an issue. If you feel the library is missing a feature, please raise a ticket on Github and we'll look into it. Pull request are welcome.