-
-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: dismiss keyboard on tap in search page (iOS) #2891
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(flutter build:*)", | ||
| "Bash(curl:*)", | ||
| "Bash(/c/tools/nuget.exe help:*)", | ||
| "Bash(rustc:*)", | ||
| "Bash(ls:*)" | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -225,15 +225,19 @@ class SearchPage extends HookConsumerWidget { | |
| ], | ||
| ), | ||
| Expanded( | ||
| child: AnimatedSwitcher( | ||
| duration: const Duration(milliseconds: 300), | ||
| child: switch (selectedChip.value) { | ||
| "tracks" => const SearchPageTracksTab(), | ||
| "albums" => const SearchPageAlbumsTab(), | ||
| "artists" => const SearchPageArtistsTab(), | ||
| "playlists" => const SearchPagePlaylistsTab(), | ||
| _ => const SearchPageAllTab(), | ||
| }, | ||
| child: GestureDetector( | ||
| onTap: () => FocusScope.of(context).unfocus(), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like this is not the correct way to lose focus in modern Flutter: https://stackoverflow.com/questions/44991968/how-can-i-dismiss-the-on-screen-keyboard |
||
| behavior: HitTestBehavior.translucent, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think translucent is what we want here (I think the default is correct). See the options here: https://api.flutter.dev/flutter/rendering/HitTestBehavior.html |
||
| child: AnimatedSwitcher( | ||
| duration: const Duration(milliseconds: 300), | ||
| child: switch (selectedChip.value) { | ||
| "tracks" => const SearchPageTracksTab(), | ||
| "albums" => const SearchPageAlbumsTab(), | ||
| "artists" => const SearchPageArtistsTab(), | ||
| "playlists" => const SearchPagePlaylistsTab(), | ||
| _ => const SearchPageAllTab(), | ||
| }, | ||
| ), | ||
| ), | ||
| ), | ||
| ], | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this file as well. |
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.
I don't think it's needed or desired to commit this file. Try adding it to .gitignore instead, or stage a subset of files before committing.