onSegmentSelected property
Called when a segment is selected.
Provides the index of the newly selected segment.
Note (iOS-style behaviour): This callback may fire during a cancelled gesture if the drag indicator travelled far enough to snap to a different segment before the cancel arrived. This matches
UISegmentedControlsemantics. If you need strict tap-only selection, compare the received index againstselectedIndexbefore acting.
Implementation
final ValueChanged<int> onSegmentSelected;