ScrollNavigation constructor

ScrollNavigation({
  1. Key? key,
  2. required List<Widget> pages,
  3. required List<ScrollNavigationItem> items,
  4. List<Widget>? pagesActionButtons,
  5. int initialPage = 0,
  6. bool showIdentifier = true,
  7. bool physics = true,
  8. int maxWillPopLocations = 5,
  9. NavigationBarStyle? barStyle,
  10. NavigationBodyStyle? bodyStyle,
  11. 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);