IntroViews-Flutter
IntroViews-Flutter copied to clipboard
Add animation for click button skip, next, back
First! Thank for your package. It saves me a lot of time. Hope I can help you with this "Request"
--> This is my code
...
void animationToPage(int page) {
nextPageIndex = page;
animatedPageDragger = AnimatedPageDragger(
slideDirection: activePageIndex > nextPageIndex
? SlideDirection.leftToRight
: SlideDirection.rightToLeft,
transitionGoal: TransitionGoal.open,
slidePercent: slidePercent,
slideUpdateStream: slideUpdateStream,
vsync: this,
);
animatedPageDragger.run();
}
...
void onPressedBack() {
animationToPage(max(0, activePageIndex - 1));
}
void onPressedNext() {
animationToPage(min(widget.pages.length - 1, activePageIndex + 1));
}
void onPressedSkip() {
animationToPage(widget.pages.length - 1);
}
...