Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. bool _didDragEnd(ScrollNotification notification) {
  2. // Whenever dragDetails are null the scrolling happends without the users input
  3. // meaning that the user release the finger --> drag has ended.
  4. // For Cupertino Scrollables the ScrollEndNotification can not be used
  5. // since it will be send after the list scroll has completely ended and
  6. // the list is in its initial state
  7. if (notification is ScrollUpdateNotification &&
  8. notification.dragDetails == null) {
  9. return true;
  10. }
  11.  
  12. // For Material Scrollables we can simply use the ScrollEndNotification
  13. if (notification is ScrollEndNotification) {
  14. return true;
  15. }
  16.  
  17. return false;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement