textfield improvements
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user