aagarwal1012 / aagarwal1012/IntroViews-Flutter
Add animation for click button skip, next, back
- Ngôn ngữ chính
- Dart
- Star
- 665
- Fork
- 140
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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);
}
...
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.