When I run this code I'm getting an error: Multiple widgets used the same GlobalKey.
So I can fix this issue.
How I can pass dynamically keys to my listview.Builder. is it possible to pass?. Here is simplified version my code:
GlobalKey<AutoCompleteTextFieldState<String>> key0 = new GlobalKey();
@override
Widget build(BuildContext context) {
return M Scaffold(
appBar: appBar,
body: SingleChildScrollView(
child: Container(
child: ListView.builder(
itemCount: 3,
itemBuilder: (context, index) {
return SimpleAutoCompleteTextField(
key: key0,
suggestions: suggestions,
textChanged: (text) => print(text),
clearOnSubmit: false,
textSubmitted: (text) => print(text)
),
}
),
),
),
);
}