BottomNavigationBuilder class

A NavigatorBuilder that allows to switch between destinations using BottomNavigationBar.

It builds a wrapper widget, which is a Scaffold with a Scaffold.body set to the current destination's content, and Scaffold.bottomNavigationBar specified.

The bottomNavigationItems must correspond to the navigator's destinations.

The bottom navigation bar can be customized using parameters, which includes all parameters supported by the BottomNavigationBar widget.

See also:

Inheritance

Constructors

BottomNavigationBuilder({List<BottomNavigationBarItem> bottomNavigationItems = const <BottomNavigationBarItem>[], BottomNavigationBarParameters parameters = const BottomNavigationBarParameters(), List<NavigationDestination> navigationBarItems = const <NavigationDestination>[], NavigationBarParameters navigationBarParameters = const NavigationBarParameters(), bool? material3})
Creates a BottomNavigationBuilder instance.
const
BottomNavigationBuilder.navigationBar({required List<NavigationDestination> navigationBarItems, NavigationBarParameters? navigationBarParameters})
Creates a BottomNavigationBuilder instance that uses Material 3 NavigationBar widget.
factory

Properties

bottomNavigationItems List<BottomNavigationBarItem>
A list of BottomNavigationBarItems, that corresponds to the navigator's destination list.
final
hashCode int
The hash code for this object.
no setterinherited
keepStateInParameters KeepingStateInParameters
Automatic persisting of upward destination.
finalinherited
A list of NavigationDestination widgets, that corresponds to the navigator's destination list.
final
A set of NavigationBar parameters.
final
parameters BottomNavigationBarParameters
A set of BottomNavigationBar parameters.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context, NavigationController navigator) Widget
Returns a widget that wraps a content of navigator's destinations.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited