onChange property

void Function(T value, int index)? onChange
final

onChange is called when the selected option is changed.; It will pass back the value and the index of the option.

Implementation

final void Function(T value, int index)? onChange;