aagarwal1012 / aagarwal1012/IntroViews-Flutter

Add animation for click button skip, next, back

未关闭
#70 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Dart
星标
665
派生
140
PR 合并指标
30 天内没有已合并 PR

描述

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);
}
...
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。