ScrollNavigation constructor
ScrollNavigation({
- Key? key,
- required List<
Widget> pages, - required List<
ScrollNavigationItem> items, - List<
Widget> ? pagesActionButtons, - int initialPage = 0,
- bool showIdentifier = true,
- bool physics = true,
- int maxWillPopLocations = 5,
- NavigationBarStyle? barStyle,
- NavigationBodyStyle? bodyStyle,
- NavigationIdentiferStyle? identiferStyle,
It is a navigation that will allow you to scroll from right to left with gestures and also when pressing an item in the Nav Item.
You need 2 elements: Pages and items.
Pages and items must have the same number of elements.
Implementation
ScrollNavigation({
Key? key,
required this.pages,
required this.items,
this.pagesActionButtons,
this.initialPage = 0,
this.showIdentifier = true,
this.physics = true,
this.maxWillPopLocations = 5,
NavigationBarStyle? barStyle,
NavigationBodyStyle? bodyStyle,
NavigationIdentiferStyle? identiferStyle,
}) : assert(items.length == pages.length),
this.barStyle = barStyle ?? NavigationBarStyle(),
this.bodyStyle = bodyStyle ?? NavigationBodyStyle(),
this.identiferStyle = identiferStyle ?? NavigationIdentiferStyle(),
super(key: key);