From 74f140f177044d13d74ddede05cbaf74269ce67a Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Sat, 7 Mar 2026 06:39:39 +0100 Subject: [PATCH] textfield improvements --- .../features/search/presentation/screens/search.dart | 5 ++--- .../features/search/presentation/widgets/search_field.dart | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/lib/features/geckoview/features/search/presentation/screens/search.dart b/app/lib/features/geckoview/features/search/presentation/screens/search.dart index 31b6ec4c..367b5ca8 100644 --- a/app/lib/features/geckoview/features/search/presentation/screens/search.dart +++ b/app/lib/features/geckoview/features/search/presentation/screens/search.dart @@ -381,9 +381,8 @@ class SearchScreen extends HookConsumerWidget { focusNode: searchFocusNode, maxLines: isEditMode ? 3 : 1, autofocus: true, - label: (activeBang != null) - ? const Text('Search') - : const Text('Address / Search'), + label: const Text('Address / Search'), + hint: const Text('Search or type URL'), unfocusOnTapOutside: false, onSubmitted: (value) async { if (value.isNotEmpty) { diff --git a/app/lib/features/geckoview/features/search/presentation/widgets/search_field.dart b/app/lib/features/geckoview/features/search/presentation/widgets/search_field.dart index c422ff34..38b893c8 100644 --- a/app/lib/features/geckoview/features/search/presentation/widgets/search_field.dart +++ b/app/lib/features/geckoview/features/search/presentation/widgets/search_field.dart @@ -42,6 +42,7 @@ class SearchField extends HookConsumerWidget { final int? minLines; final bool unfocusOnTapOutside; final GlobalKey? textFieldKey; + final Widget? hint; final BangData? activeBang; final bool showBangIcon; @@ -60,6 +61,7 @@ class SearchField extends HookConsumerWidget { this.showBangIcon = true, this.autofocus = false, this.textFieldKey, + this.hint, }); @override @@ -120,7 +122,7 @@ class SearchField extends HookConsumerWidget { ) : null, label: label ?? const Text('Search'), - // hintText: 'Ask anything...', + hint: hint, floatingLabelBehavior: FloatingLabelBehavior.always, suffixIcon: hasText ? IconButton(