Last active
January 20, 2021 21:14
-
-
Save reime005/748e1ad76cae4447b13065e0b6968e85 to your computer and use it in GitHub Desktop.
flutter-onboarding-experience-3
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 Colum( | |
children: [ | |
PageView( | |
scrollDirection: Axis.horizontal, | |
controller: _controller, | |
onPageChanged: (value) { | |
setState(() { | |
_currentIndex = value; | |
}); | |
}, | |
children: data | |
.map((e) => ExplanationPage(data: e)) | |
.toList() | |
), | |
Container( | |
margin: const EdgeInsets.symmetric(vertical: 24), | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: List.generate(data.length, | |
(index) => createCircle(index: index)), | |
) | |
) | |
// bottom buttons (not shown) | |
] | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment