scrollDirection property

Axis? get scrollDirection

Retrieves the scroll direction of the associated scrollable widget.

  • If no ScrollController is assigned, the scroll direction of the parent scrollable widget is returned.
  • If a ScrollController is assigned, its direction is returned.

Implementation

Axis? get scrollDirection {
  if (isScrollOutside) {
    return Scrollable.maybeOf(_context)?.position.axis;
  } else {
    return _scrollController?.position.axis;
  }
}