onPositionUpdated method

void onPositionUpdated(
  1. ScrollPosition newPosition
)

callback when the indicator is builded,and catch the scrollable's inner position

Implementation

void onPositionUpdated(ScrollPosition newPosition) {
  position?.isScrollingNotifier.removeListener(_listenScrollEnd);
  position = newPosition;
  position!.isScrollingNotifier.addListener(_listenScrollEnd);
}