Parameters of NavbarRouter widget.#
backButtonBehavior:An enum which decides, How the back button is handled, defaults to
destinations: A List of
DestinationRouter to show when the user taps the [NavbarItem].
Each DestinationRouter specifies a List of Destinations, initialRoute, and the navbarItem corresponding to that destination.
type: The type of NavigationBar to be passed to NavbarRouter defaults to
NavbarType.standard. This allows you to choose between the default
decoration : The decoraton for Navbar has all the properties you would expect in a [BottomNavigationBar] to adjust the style of the Navbar.
destinationAnimationCurve: Curve for the destination animation when the user taps a navbar item. Defaults to
destinationAnimationDuration: The duration in milliseconds of the animation of the destination. Defaults to 700ms.
errorBuilder: A WidgetBuilder to show the user when the user tried to navigate to a route that does not exist in the [destinations].
initialIndex: Navbar item that is initially selected, defaults to the first item in the list of [NavbarItems]
isDesktop: if true, navbar will be shown on the left, this property can be used along with
NavbarDecoration.isExtended to make the navbar adaptable for large screen sizes.
onBackButtonPressed: A function which defines whether it is the root Navigator or not. if the method returns true then the Navigator is at the base of the navigator stack
onChanged: A callback that is called when the currentIndex of the navbarchanges.
shouldPopToBaseRoute: A boolean which decides, whether the navbar should pop to the base route (pop all except first) when the current navbar is tapped while the route is deeply nested. This feature is similar to Instagram's navigation bar defaults to true.
onCurrentTabClicked: A callback that is called when the selected navbar is tapped again. (This allows you to handle useCases like scroll to top when the navbar is tapped again or Pop to the base route similar to Instagram.)