• LongCatIsLooong's avatar
    Add `FocusNode.focusabilityListenable` (#144280) · 726e5d28
    LongCatIsLooong authored
    This is for https://github.com/flutter/flutter/issues/127803: a text field should unregister from the scribble scope, when it becomes unfocusable. 
    
    When a `FocusNode` has listeners and its `_canRequestFocus` flag is set to true, it adds `+1` to `_focusabilityListeningDescendantCount` of all ancestors until it reaches the first ancestor with `descendantsAreFocusable = false`. When the a `FocusNode`'s `descendantsAreFocusable` changes, all listeners that contributed to its `_focusabilityListeningDescendantCount` will be notified.
    726e5d28
focus_scope_test.dart 84 KB