TabsNavigationBuilder class

A NavigatorBuilder that allows to switch between destinations using TabBar.

It builds a wrapper widget, which is a Scaffold with a Scaffold.appbar set to the TabBar with provided tabs, and a Scaffold.body set to the TabBarView, which display a content of corresponding destination.

The tabs must correspond to the navigator's destinations.

The tab bar can be customized using parameters, which includes all parameters supported by the TabBar widget.

See also:

Inheritance

Constructors

TabsNavigationBuilder({required List<Widget> tabs, TabBarParameters parameters = const TabBarParameters(), AppBarParameters appBarParametersBuilder(BuildContext context, Destination<DestinationParameters> destination)?, bool wrapInScaffold = true})
Creates a TabsNavigationBuilder instance.
const

Properties

appBarParametersBuilder → (AppBarParameters Function(BuildContext context, Destination<DestinationParameters> destination)?)
Return an instance of AppBarParameters for provided destination.
final
hashCode int
The hash code for this object.
no setterinherited
keepStateInParameters KeepingStateInParameters
Automatic persisting of upward destination.
finalinherited
parameters TabBarParameters
A set of TabBar parameters.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tabs List<Widget>
Typically a list of Tab widgets, that corresponds to the navigator's destination list.
final
wrapInScaffold bool
Controls if the Scaffold widget should be used around the tab bar and tab's content.
final

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