What's the usage of the textEditingController
provided to fieldViewBuilder
in the Autocomplete
widget? What can it be used for? Can it be used to modify or clear the content of the TextField
?
Autocomplete<String>(
fieldViewBuilder: (
BuildContext context,
TextEditingController textEditingController,
FocusNode focusNode,
VoidCallback onFieldSubmitted,
) {
return TextField(
controller: textEditingController,
focusNode: focusNode,
onChanged: (String value) {
print('The text has changed to: $value');
},
);
},