position property

ScrollMetrics get position

The current scroll position.

Implementation

ScrollMetrics get position => _position!;
set position (ScrollMetrics value)

Implementation

set position(ScrollMetrics value) {
  if (value.isNestedOuter) {
    _viewportDimension = value.viewportDimension;
  } else if (value.isNestedInner) {
    if (WidgetsBinding.instance.schedulerPhase !=
        SchedulerPhase.persistentCallbacks) {
      _viewportDimension = value.axis == Axis.vertical
          ? vsync.context.size?.height
          : vsync.context.size?.width;
    }
  } else {
    _viewportDimension = null;
  }
  _position = value;
  _lastMaxScrollExtent = value.maxScrollExtent;
}