This question has satisfying answers for the bigger part of this question but there's a small case that I can't get rid of.
After using the method from the accepted answer
Only one of the pages inside the PageView has a CollectionView. When you swipe into that one page and swipe again the collection view handles the gestures because the pageView no longer has a datasource.
If I keep swiping and get to the last cell of the collectionView my next swipe goes to the PageView because I set the datasource (when i was on the last cell). And all is well.
The Problem
Problems start if I change my mind. On the last cell, if I move my finger slightly towards the next page and then (without removing my finger) swipe towards the previous cell it jumps to the previous page (not the previous cell). Supposedly because the datasource has been set, and the gesture that was supposed to set it to nil was not recognised.
Has anyone had this issue? How do I handle gesture that started in one direction and then went in the other?