onSelected property
final
The callback is called when a selection is made.
The callback receives the selected entry's value of type T when the user
chooses an item. It may also be invoked with null to indicate that the
selection was cleared / that no item was chosen.
Defaults to null. If this callback itself is null, the widget still updates the text field with the selected label.
Implementation
final ValueChanged<T?>? onSelected;