onSegmentSelected property

ValueChanged<int> onSegmentSelected
final

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 UISegmentedControl semantics. If you need strict tap-only selection, compare the received index against selectedIndex before acting.

Implementation

final ValueChanged<int> onSegmentSelected;