getScrollbarDirection method Null safety

  1. @protected
Axis? getScrollbarDirection()
protected">@protected

Returns the Axis of the child scroll view, or null if the current scroll controller does not have any attached positions.

Implementation

@protected
Axis? getScrollbarDirection() {
  assert(_currentController != null);
  if (_currentController!.hasClients) {
    return _currentController!.position.axis;
  }
  return null;
}