disable autocorrect for address by default
This commit is contained in:
@@ -49,6 +49,7 @@ class AutoSuggestTextField extends HookWidget {
|
|||||||
final bool? enableIMEPersonalizedLearning;
|
final bool? enableIMEPersonalizedLearning;
|
||||||
final TapRegionCallback? onTapOutside;
|
final TapRegionCallback? onTapOutside;
|
||||||
final VoidCallback? onTap;
|
final VoidCallback? onTap;
|
||||||
|
final bool autocorrect;
|
||||||
|
|
||||||
const AutoSuggestTextField({
|
const AutoSuggestTextField({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -77,6 +78,7 @@ class AutoSuggestTextField extends HookWidget {
|
|||||||
this.enableIMEPersonalizedLearning = true,
|
this.enableIMEPersonalizedLearning = true,
|
||||||
this.onTapOutside,
|
this.onTapOutside,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
|
this.autocorrect = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
bool _suggestionHasMatch() =>
|
bool _suggestionHasMatch() =>
|
||||||
@@ -216,6 +218,7 @@ class AutoSuggestTextField extends HookWidget {
|
|||||||
onChanged: onChanged,
|
onChanged: onChanged,
|
||||||
onEditingComplete: onEditingComplete,
|
onEditingComplete: onEditingComplete,
|
||||||
validator: validator,
|
validator: validator,
|
||||||
|
autocorrect: autocorrect,
|
||||||
onFieldSubmitted: onSubmitted.mapNotNull(
|
onFieldSubmitted: onSubmitted.mapNotNull(
|
||||||
(onSubmitted) => (value) {
|
(onSubmitted) => (value) {
|
||||||
if (_suggestionHasMatch()) {
|
if (_suggestionHasMatch()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user