Skip to content

Commit

Permalink
Merge pull request #201 from floffel/master
Browse files Browse the repository at this point in the history
[feature] hide back/next buttons when !canProgess
  • Loading branch information
ghenry authored Jan 28, 2024
2 parents acf3c8e + cdede22 commit b3be8d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/introduction_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ class IntroductionScreenState extends State<IntroductionScreen> {
onPressed: _onSkip,
),
);
} else if (widget.showBackButton && getCurrentPage() > 0) {
} else if (widget.showBackButton && getCurrentPage() > 0 && widget.canProgress(getCurrentPage())) {
leftBtn = widget.overrideBack ??
IntroButton(
child: widget.back!,
Expand All @@ -589,7 +589,7 @@ class IntroductionScreenState extends State<IntroductionScreen> {
semanticLabel: widget.doneSemantic,
onPressed: !_isScrolling ? widget.onDone : null,
);
} else if (!isLastPage && widget.showNextButton) {
} else if (!isLastPage && widget.showNextButton && widget.canProgress(getCurrentPage())) {
rightBtn = widget.overrideNext ??
IntroButton(
child: widget.next!,
Expand Down

0 comments on commit b3be8d4

Please sign in to comment.