Trigger location search only after the user has entered at least 2 characters
This commit is contained in:
parent
df800b0e92
commit
7e37df2947
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class _LocationSearchWidgetState extends State<LocationSearchWidget> {
|
|||
},
|
||||
debounceDuration: Duration(milliseconds: 0),
|
||||
suggestionsCallback: (pattern) async {
|
||||
if (pattern.isEmpty) {
|
||||
if (pattern.isEmpty || pattern.length < 2) {
|
||||
return null;
|
||||
}
|
||||
_searchString = pattern;
|
||||
|
|
Loading…
Add table
Reference in a new issue