deltaToScrollOrigin property

Offset deltaToScrollOrigin

An Offset that represents the absolute distance from the origin, or 0, of the ScrollPosition expressed in the associated Axis.

Used by EdgeDraggingAutoScroller to progress the position forward when a drag gesture reaches the edge of the Viewport.

Implementation

Offset get deltaToScrollOrigin {
  switch (axisDirection) {
    case AxisDirection.down:
      return Offset(0, position.pixels);
    case AxisDirection.up:
      return Offset(0, -position.pixels);
    case AxisDirection.left:
      return Offset(-position.pixels, 0);
    case AxisDirection.right:
      return Offset(position.pixels, 0);
  }
}