A material widget displayed at the bottom of an app for selecting among a small number of views.

The bottom navigation bar consists of multiple items in the form of labels, icons, or both, laid out on top of a piece of material. It provides quick navigation between the top-level views of an app. For larger screens, side navigation may be a better fit.

A bottom navigation bar is usually used in conjunction with Scaffold where it is provided as the bottomNavigationBar argument.

See also:

Inheritance

Constructors

BottomNavigationBar({Key key, @required List<BottomNavigationBarItem> items, ValueChanged<int> onTap, int currentIndex: 0, BottomNavigationBarType type: BottomNavigationBarType.fixed, Color fixedColor, double iconSize: 24.0 })

Creates a bottom navigation bar, typically used in a Scaffold where it is provided as the bottomNavigationBar argument.

Properties

currentIndex int

The index into items of the current active item.

read-only
fixedColor Color

The color of the selected item when bottom navigation bar is BottomNavigationBarType.fixed.

read-only
iconSize double

The size of all of the BottomNavigationBarItem icons.

read-only
items List<BottomNavigationBarItem>

The interactive items laid out within the bottom navigation bar.

read-only
onTap ValueChanged<int>

The callback that is called when a item is tapped.

read-only
type BottomNavigationBarType

Defines the layout and behavior of a BottomNavigationBar.

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
key Key

Controls how one widget replaces another widget in the tree.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

createState() BottomNavigationBarState

Creates the mutable state for this widget at a given location in the tree.

createElement() StatefulElement

Creates a StatefulElement to manage this widget's location in the tree.

inherited
debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited
toStringShort() String

A short, textual description of this widget.

inherited