Jon
Committed by GitHub

Prevent scrolling beyond the maximum position (#427)

@@ -139,6 +139,10 @@ class BouncingSheetPhysics extends ScrollPhysics with SheetPhysics { @@ -139,6 +139,10 @@ class BouncingSheetPhysics extends ScrollPhysics with SheetPhysics {
139 } 139 }
140 return true; 140 return true;
141 }()); 141 }());
  142 + // Prevent scrolling beyond the maximum position
  143 + if (value > position.maxScrollExtent) {
  144 + return value - position.maxScrollExtent;
  145 + }
142 if (!overflowViewport) { 146 if (!overflowViewport) {
143 // overscroll 147 // overscroll
144 if (position.viewportDimension <= position.pixels && 148 if (position.viewportDimension <= position.pixels &&