Last active
February 17, 2020 02:20
-
-
Save slamdon/2a8c90a0c7594a28d27ce93de5a95a6b to your computer and use it in GitHub Desktop.
tripPageTransformer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
final pageView = this.widget.pageViewBuilder( | |
context, | |
_visibilityResolver ?? TripPageVisibilityResolver(), | |
); | |
return NotificationListener<ScrollNotification>( | |
child: pageView, | |
onNotification: (ScrollNotification notification) { | |
setState(() { | |
_visibilityResolver = TripPageVisibilityResolver( | |
scrollMetrics: notification.metrics, | |
viewPortFraction: pageView.controller.viewportFraction, | |
); | |
}); | |
return null; | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment