public virtual bool shouldAcceptUserOffset(ScrollMetrics position) { if (parent == null) { return(position.pixels != 0.0 || position.minScrollExtent != position.maxScrollExtent); } return(parent.shouldAcceptUserOffset(position)); }
void _handlePointerScroll(PointerEvent e) { D.assert(e is PointerScrollEvent); if (_physics != null && !_physics.shouldAcceptUserOffset(position)) { return; } float targetScrollOffset = _targetScrollOffsetForPointerScroll(e as PointerScrollEvent); if (targetScrollOffset != position.pixels) { position.jumpTo(targetScrollOffset); } }