onSelectedItemChanged property
An option callback when the currently centered item changes.
Value changes when the item closest to the center changes.
This can be called during scrolls and during ballistic flings. To get the value only when the scrolling settles, use a NotificationListener, listen for ScrollEndNotification and read its FixedExtentMetrics.
Implementation
final ValueChanged<int> onSelectedItemChanged;