Add Supa account and search changes

This commit is contained in:
Fabian Freund
2026-05-22 18:10:22 +02:00
parent 3a19865b2e
commit 51289f1266
374 changed files with 54061 additions and 5013 deletions
@@ -54,6 +54,10 @@ class AutoSuggestTextField extends HookWidget {
final bool autocorrect;
final GlobalKey? textFieldKey;
/// Whether pressing the keyboard submit/enter button should automatically
/// accept and complete an inline search suggestion. Defaults to false.
final bool acceptSuggestionOnSubmit;
const AutoSuggestTextField({
super.key,
required this.controller,
@@ -84,6 +88,7 @@ class AutoSuggestTextField extends HookWidget {
this.onSuggestionDismiss,
this.autocorrect = false,
this.textFieldKey,
this.acceptSuggestionOnSubmit = false,
});
bool _suggestionHasMatch() =>
@@ -215,7 +220,7 @@ class AutoSuggestTextField extends HookWidget {
autocorrect: autocorrect,
onFieldSubmitted: onSubmitted.mapNotNull(
(onSubmitted) => (value) {
if (_suggestionHasMatch()) {
if (acceptSuggestionOnSubmit && _suggestionHasMatch()) {
onSubmitted(suggestion!);
} else {
onSubmitted(value);