• Greg Spencer's avatar
    Add `ExcludeFocus` widget, and a way to prevent focusability for a subtree. (#55756) · fdc4d21b
    Greg Spencer authored
    This adds an ExcludeFocus widget that prevents widgets in a subtree from having or obtaining focus. It also adds the ability for a FocusNode to conditionally prevent its children from being focusable when it isn't focusable (i.e. when canRequestFocus is false).
    
    It does this by adding an descendantsAreFocusable attribute to the FocusNode, which, when false, prevents the descendants of the node from being focusable (and removes focus from them if they are currently focused).
    fdc4d21b
focus_scope.dart 36.4 KB