I am struggling to create TextField with autocomplete overlay. I have form with TextFields and I want to display suggestions based on what is typed in TextField.
Someth
You can make use of autocomplete_textfield library to achieve that.
Basic Usage
...
SimpleAutoCompleteTextField(
key: key,
suggestions: [
"Apple",
"Armidillo",
"Actual",
"Actuary",
"America",
"Argentina",
"Australia",
"Antarctica",
"Blueberry",],
decoration: InputDecoration(
filled: true,
fillColor: Colors.black12,
hintText: 'Dictionary'
),
),
...
You can get more examples here.
Another Option
You can also make use of flutter_typeahead
This worked better for me when working with StreamBuilder
for BLoC pattern.