Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Disable dragging/sliding implemented #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion lib/src/ui/intro_views_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class IntroViewsFlutter extends StatefulWidget {
this.skipText = const Text('SKIP'),
this.backText = const Text('BACK'),
this.doneButtonPersist = false,
this.enabled = true,
this.columnMainAxisAlignment = MainAxisAlignment.spaceAround,
this.fullTransition = FULL_TRANSITION_PX,
this.background,
Expand Down Expand Up @@ -127,6 +128,10 @@ class IntroViewsFlutter extends StatefulWidget {
/// Defaults to 300.0.
final double fullTransition;

/// Enable or disbale full page transition.
///
final bool enabled;

/// Sets the background color to Colors.transparent if you have your own
/// background image below.
final Color? background;
Expand Down Expand Up @@ -334,7 +339,8 @@ class _IntroViewsFlutterState extends State<IntroViewsFlutter>
),
PageDragger(
// used for gesture control
fullTransitionPX: widget.fullTransition,
fullTransitionPX:
widget.enabled ? widget.fullTransition : double.infinity,
canDragLeftToRight: activePageIndex > 0,
canDragRightToLeft: activePageIndex < pages.length - 1,
slideUpdateStream: slideUpdateStream,
Expand Down