onValueChanged property

ValueChanged<T> onValueChanged

The callback that is called when a new option is tapped.

This attribute must not be null.

The segmented control passes the newly selected widget's associated key to the callback but does not actually change state until the parent widget rebuilds the segmented control with the new groupValue.


final ValueChanged<T> onValueChanged;