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
Jaime Blasco
2020-07-05 14:50:06 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
36b502aaef8ec9aa6e31b5f43da27de70938928e
36b502aa
1 parent
bdb493f8
Not listen to horizontal scroll updates
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
lib/src/bottom_sheet.dart
lib/src/bottom_sheet.dart
View file @
36b502a
...
...
@@ -244,17 +244,19 @@ class _ModalBottomSheetState extends State<ModalBottomSheet>
DateTime
_startTime
;
void
_handleScrollUpdate
(
ScrollNotification
notification
)
{
final
scrollPosition
=
_scrollController
.
position
;
if
(
scrollPosition
.
axis
==
Axis
.
horizontal
)
return
;
//Check if scrollController is used
if
(!
_scrollController
.
hasClients
)
return
;
final
isScrollReversed
=
scrollPosition
.
axisDirection
==
AxisDirection
.
down
;
final
offset
=
isScrollReversed
?
scrollPosition
.
pixels
:
scrollPosition
.
maxScrollExtent
-
scrollPosition
.
pixels
;
if
(
offset
<=
0
)
{
//Check if scrollController is used
if
(!
_scrollController
.
hasClients
)
return
;
// Check if listener is same from scrollController.
// TODO: Improve the way it checks if it the same view controller
// Use PrimaryScrollController
...
...
Please
register
or
login
to post a comment