Created
February 17, 2020 02:24
-
-
Save slamdon/20e7de43a3e2971e04da4e2a7c6f794b to your computer and use it in GitHub Desktop.
HomePage
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) { | |
return Center( | |
child: SizedBox.fromSize( | |
size: Size.fromHeight(550), | |
child: TripPageTransformer( | |
pageViewBuilder: (context, visibilityResolver) { | |
return PageView.builder( | |
controller: PageController(viewportFraction: 0.85), | |
itemCount: trips.length, | |
itemBuilder: (context, index) { | |
final trip = trips[index]; | |
final pageVisibility = | |
visibilityResolver.resolvePageVisibility(index); | |
return TripPageItem( | |
trip: trip, tripPageVisibility: pageVisibility); | |
}, | |
); | |
}, | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment