Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions lib/src/introduction_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ class IntroductionScreen extends StatefulWidget {
/// @Default `false`
final bool showBackButton;

/// If the Back button should be display for the first page
///
/// @Default `false`
final bool showFirstBackButton;

/// If a custom Widget should be used instead of the default progress indicator
///
/// @Default `null`
Expand Down Expand Up @@ -305,6 +310,7 @@ class IntroductionScreen extends StatefulWidget {
this.showDoneButton = true,
this.showBottomPart = true,
this.showBackButton = false,
this.showFirstBackButton = false,
this.customProgress,
this.isProgress = true,
this.hideBottomOnKeyboard = false,
Expand Down Expand Up @@ -575,9 +581,10 @@ class IntroductionScreenState extends State<IntroductionScreen> {
onPressed: _onSkip,
),
);
} else if (widget.showBackButton &&
getCurrentPage() > 0 &&
widget.canProgress(getCurrentPage())) {
} else if ((widget.showFirstBackButton && getCurrentPage() == 0) ||
(widget.showBackButton &&
getCurrentPage() > 0 &&
widget.canProgress(getCurrentPage()))) {
leftBtn = widget.overrideBack != null
? widget.overrideBack!(context, !_isScrolling ? previous : null)
: IntroButton(
Expand Down
Loading