controller property
Controls the text being edited.
If null, this widget will create its own TextEditingController. A typical use case for this field in the TypeAhead widget is to set the text of the widget when a suggestion is selected. For example:
final _controller = TextEditingController();
...
...
TypeAheadField(
controller: _controller,
...
...
onSuggestionSelected: (suggestion) {
_controller.text = suggestion['city_name'];
}
)
Implementation
final TextEditingController? controller;