mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-06 04:58:23 +00:00
Fix minor UX annoyances in search bar
This commit is contained in:
@@ -35,6 +35,7 @@ class SearchScreen extends HookConsumerWidget {
|
||||
child: SearchBar(
|
||||
controller: controller,
|
||||
focusNode: focusNode,
|
||||
onTapOutside: (_) => focusNode.unfocus(),
|
||||
shape: WidgetStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
@@ -82,6 +83,7 @@ class SearchScreen extends HookConsumerWidget {
|
||||
WidgetStateProperty.all(TextStyle(color: Colors.grey[600])),
|
||||
elevation: WidgetStateProperty.all(2.2),
|
||||
onSubmitted: (query) async {
|
||||
if (query.isEmpty) return;
|
||||
ref.read(searchQueryProvider.notifier).state = query;
|
||||
scrollController.animateTo(
|
||||
scrollController.position.minScrollExtent,
|
||||
|
||||
Reference in New Issue
Block a user