Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
modal_bottom_sheet
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jon
2024-11-18 17:39:21 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-11-18 18:39:21 +0100
Commit
ac1ddc856a54e323d9459f3d4940d25db98a6c0b
ac1ddc85
1 parent
19471c18
Prevent scrolling beyond the maximum position (#427)
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
sheet/lib/src/physics.dart
sheet/lib/src/physics.dart
View file @
ac1ddc8
...
...
@@ -139,6 +139,10 @@ class BouncingSheetPhysics extends ScrollPhysics with SheetPhysics {
}
return
true
;
}());
// Prevent scrolling beyond the maximum position
if
(
value
>
position
.
maxScrollExtent
)
{
return
value
-
position
.
maxScrollExtent
;
}
if
(!
overflowViewport
)
{
// overscroll
if
(
position
.
viewportDimension
<=
position
.
pixels
&&
...
...
Please
register
or
login
to post a comment