File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -366,10 +366,6 @@ class IntroductionScreen extends StatefulWidget {
366
366
! showBackButton || back != null || overrideBack != null ,
367
367
"You must set 'back' or 'overrideBack' parameter, or set 'showBackButton' to false" ,
368
368
),
369
- assert (
370
- ! (showBackButton && showSkipButton),
371
- "You cannot set 'showBackButton' and 'showSkipButton' to true. Only one, or both false." ,
372
- ),
373
369
assert (
374
370
skipOrBackFlex >= 0 && dotsFlex >= 0 && nextFlex >= 0 ,
375
371
'Flex parameters must be >= 0' ,
@@ -550,7 +546,9 @@ class IntroductionScreenState extends State<IntroductionScreen> {
550
546
final isLastPage = (getCurrentPage () == getPagesLength () - 1 );
551
547
552
548
Widget ? leftBtn;
553
- if (widget.showSkipButton) {
549
+ // show skip button when skip is enabled and back is disabled,
550
+ // or show it on the first page when back is enabled.
551
+ if (widget.showSkipButton && ((getCurrentPage () == 0 && widget.showBackButton) || ! widget.showBackButton)) {
554
552
leftBtn = Visibility (
555
553
visible: ! isLastPage && ! _isSkipPressed,
556
554
maintainState: true ,
You can’t perform that action at this time.
0 commit comments