Skip to content

Instantly share code, notes, and snippets.

@reime005
Last active January 20, 2021 21:14
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 reime005/748e1ad76cae4447b13065e0b6968e85 to your computer and use it in GitHub Desktop.
Save reime005/748e1ad76cae4447b13065e0b6968e85 to your computer and use it in GitHub Desktop.
flutter-onboarding-experience-3
@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