onSelected property Null safety

AutocompleteOnSelected<T>? onSelected
final

Called when an option is selected by the user.

Any TextEditingController listeners will not be called when the user selects an option, even though the field will update with the selected value, so use this to be informed of selection.

Implementation

final AutocompleteOnSelected<T>? onSelected;