Basically what we do is adding a NotificationListener to a ListView . It will invoke _onNotification on every scroll event. Then, we calculate the value of the middle element based on the notification’s Offset . If the calculated value is different than the passed value , we call onChanged method.

Alright, but what happens then? We will store the selected weight in WeightCard and simply update state: