SuperPager is made to extend Flutter's PageView with some additional features.
-
Page indicator.
-
Next button.
-
Skip button.
You should ensure that you add the super_pager
as a dependency in your flutter project.
dependencies:
super_pager: '^0.0.1'
You should then run flutter packages get
in your terminal so as to get the package.
-
Just wrap your
PageView
widget withPageViewIndicator
, and add some parameters.PageViewIndicator( child: PageView(children: _getPages()), onSkip: (ctx) => _navigateToOtherRoute(ctx), showNextButton: true, defaultDotColor: Colors.deepOrange, currentDotColor: Colors.pinkAccent, buttonsColor: Colors.lime, backgroundColor: Colors.blueGrey, )),
Dart attribute | Datatype | Description | Default Value |
---|---|---|---|
child | PageView | PageView to be wrapped. | @required |
onSkip | VoidCallback | Method executes on tapping done button. | Null |
showNextButton | Bool | Show the Next button at the end of the indicator footer. | true |
defaultDotColor | Color | Set the indicator default dot color. | Theme.of(context).primaryColor |
currentDotColor | Color | Set the current step indicator dot color. | Theme.of(context).primaryColorDark |
buttonsColor | Color | Set the color of the Next and Skip buttons. | Null |
backgroundColor | Color | Set the color of the footer's background. | Null |
For help on editing package code, view the flutter documentation.
SuperPager is licensed under MIT license
.