-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Support CupertinoSliverNavigationBar.search with condensed large title #159120
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uploading Screen Recording 2024-11-19 at 10.49.22 AM.mov…
Looking at the settings app, the content will fade in and out during the search transition as well. To enable coordinating the two transitions, ideally they both would use the same animation controller. So I wonder if we should either: Make the animation controller of the sliver navbar public so it can be accessed, or accept an animation controller in the constructor so it can be passed down from the context around it? I think I'd lean towards the former option.
Also, are we planning to do something similar with the non-sliver navbar?
@@ -1044,6 +1046,10 @@ class CupertinoSliverNavigationBar extends StatefulWidget { | |||
/// Defaults to [NavigationBarBottomMode.automatic] if this is null and a [bottom] is provided. | |||
final NavigationBarBottomMode? bottomMode; | |||
|
|||
/// Callback called when the search field in [CupertinoSliverNavigationBar.search] | |||
/// is focused or unfocused. | |||
final ValueChanged<bool>? onSearchFocused; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the final version, we probably don't want to refer to it as onSearchFocused
. Focused suggests it triggers when a keyboard navigates to it, which is probably not what we want. Maybe onSearchActive
?
Thinking the former as well. This implementation also replaces the initial search field with a new interactive one. I'm thinking we also add that as a property? Maybe
I doubt it. Since in the non-sliver version we don't provide a |
…d large title (#162912) Original PR: #159120 The next stable branch has `CupertinoSliverNavigationBar.search`, but it is currently [unusable](#159120 (comment)). The linked PR adds the search functionality and makes it usable.
…d large title (#162912) Original PR: flutter/flutter#159120 The next stable branch has `CupertinoSliverNavigationBar.search`, but it is currently [unusable](flutter/flutter#159120 (comment)). The linked PR adds the search functionality and makes it usable.
search.animation.mov
Fixes Suggestion: CupertinoSliverNavigationBar allow forcing condensed title
Fixes Expose search field in CupertinoSliverNavigationBar.search
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.