Skip to content

Instantly share code, notes, and snippets.

@slamdon
Last active February 17, 2020 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slamdon/2a8c90a0c7594a28d27ce93de5a95a6b to your computer and use it in GitHub Desktop.
Save slamdon/2a8c90a0c7594a28d27ce93de5a95a6b to your computer and use it in GitHub Desktop.
tripPageTransformer
@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