FocusableActionDetector widget (#44867)
This adds a FocusableActionDetector, a widget which combines the functionality of Actions, Shortcuts, MouseRegion and a Focus widget to create a detector that defines actions and key bindings, and will notify that the focus or hover highlights should be shown or not. This widget can be used to give a control the required detection modes for focus and hover handling on desktop and web platforms. I replaced a bunch of similar code in many of our widgets with this widget, and found that pretty much any control that wants to be focusable wants all of these features as well: focus highlights, hover highlights, and actions to activate it. Also eliminated an extra _hasFocus variable in FocusState that wasn't being used.
Showing
Please register or sign in to comment