NavbarRouter constructor

const NavbarRouter({
  1. Key? key,
  2. required List<DestinationRouter> destinations,
  3. required WidgetBuilder errorBuilder,
  4. bool shouldPopToBaseRoute = true,
  5. dynamic onChanged(
    1. int
    )?,
  6. NavbarDecoration? decoration,
  7. bool isDesktop = false,
  8. int initialIndex = 0,
  9. NavbarType type = NavbarType.standard,
  10. Curve destinationAnimationCurve = Curves.fastOutSlowIn,
  11. int destinationAnimationDuration = 300,
  12. BackButtonBehavior backButtonBehavior = BackButtonBehavior.exit,
  13. dynamic onCurrentTabClicked()?,
  14. bool hideBadgeOnPageChanged = true,
  15. bool onBackButtonPressed(
    1. bool
    )?,
})

Take a look at the readme for more information on how to use this package.

Please help me improve this package. Found a bug? Please file an issue here or File a feature request by clicking here

Implementation

const NavbarRouter(
    {Key? key,
    required this.destinations,
    required this.errorBuilder,
    this.shouldPopToBaseRoute = true,
    this.onChanged,
    this.decoration,
    this.isDesktop = false,
    this.initialIndex = 0,
    this.type = NavbarType.standard,
    this.destinationAnimationCurve = Curves.fastOutSlowIn,
    this.destinationAnimationDuration = 300,
    this.backButtonBehavior = BackButtonBehavior.exit,
    this.onCurrentTabClicked,
    this.hideBadgeOnPageChanged = true,
    this.onBackButtonPressed})
    : assert(destinations.length >= 2,
          "Destinations length must be greater than or equal to 2"),
      super(key: key);