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) {
  assert(newPosition != null);
  position?.isScrollingNotifier?.removeListener(_listenScrollEnd);
  position = newPosition;
  position.isScrollingNotifier.addListener(_listenScrollEnd);
}