Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool _didDragEnd(ScrollNotification notification) {
- // Whenever dragDetails are null the scrolling happends without the users input
- // meaning that the user release the finger --> drag has ended.
- // For Cupertino Scrollables the ScrollEndNotification can not be used
- // since it will be send after the list scroll has completely ended and
- // the list is in its initial state
- if (notification is ScrollUpdateNotification &&
- notification.dragDetails == null) {
- return true;
- }
- // For Material Scrollables we can simply use the ScrollEndNotification
- if (notification is ScrollEndNotification) {
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement