From cdede22619bf6abf5dd62d941672c7ee18d32b99 Mon Sep 17 00:00:00 2001 From: Florian Minnecker Date: Thu, 2 Nov 2023 12:50:34 +0100 Subject: [PATCH] [feature] hide back/next buttons when !canProgess --- lib/src/introduction_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/introduction_screen.dart b/lib/src/introduction_screen.dart index 40861d1..0b33e3b 100644 --- a/lib/src/introduction_screen.dart +++ b/lib/src/introduction_screen.dart @@ -568,7 +568,7 @@ class IntroductionScreenState extends State { onPressed: _onSkip, ), ); - } else if (widget.showBackButton && getCurrentPage() > 0) { + } else if (widget.showBackButton && getCurrentPage() > 0 && widget.canProgress(getCurrentPage())) { leftBtn = widget.overrideBack ?? IntroButton( child: widget.back!, @@ -589,7 +589,7 @@ class IntroductionScreenState extends State { 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!,