-
-
Notifications
You must be signed in to change notification settings - Fork 187
feat: add descendantsAreTraversable parameter to useFocusNode #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA new boolean parameter, Changes
Sequence Diagram(s)sequenceDiagram
participant Widget
participant useFocusNode
participant _FocusNodeHook
participant FocusNode
Widget->>useFocusNode: Call with descendantsAreTraversable
useFocusNode->>_FocusNodeHook: Pass descendantsAreTraversable
_FocusNodeHook->>FocusNode: Construct with descendantsAreTraversable
Note right of FocusNode: descendantsAreTraversable set
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (8)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
LGTM thanks! |
Summary
Adds support for the
descendantsAreTraversable
parameter touseFocusNode
hook to match Flutter'sFocusNode
constructor.Context
Flutter added the
descendantsAreTraversable
parameter toFocusNode
to control whether descendants of this focus node can be traversed by the focus system. This parameter was missing from theuseFocusNode
hook, preventing users from accessing this functionality through flutter_hooks.Changes
descendantsAreTraversable
parameter touseFocusNode
function with default valuetrue
_FocusNodeHook
class to handle the new parameter_FocusNodeHookState
to properly initialize and update the parameterTesting
FocusNode
FocusNode
constructorBackward Compatibility
Fully backward compatible - existing code will continue to work unchanged as the new parameter has a default value of
true
matching Flutter's behavior.References
Summary by CodeRabbit