Detect horizontal gestures inside a vertical ScrollView and forward them as PageView page changes.
A screen may need horizontal page switching and vertical scrolling at the same time. When a ScrollView is nested inside a PageView, both controls may compete for the same touch gesture.
The hierarchy in this example is:
Without extra handling, vertical scrolling works inside the white ScrollView area, but horizontal page switching does not. The solution below measures the gesture direction and explicitly changes pages when horizontal movement exceeds a threshold.