CupertinoTabView class

A single tab view with its own Navigator state and history.

A typical tab view used as the content of each tab in a CupertinoTabScaffold where multiple tabs with parallel navigation states and history can co-exist.

CupertinoTabView configures the top-level Navigator to search for routes in the following order:

  1. For the / route, the builder property, if non-null, is used.

  2. Otherwise, the routes table is used, if it has an entry for the route, including / if builder is not specified.

  3. Otherwise, onGenerateRoute is called, if provided. It should return a non-null value for any valid route not handled by builder and routes.

  4. Finally if all else fails onUnknownRoute is called.

These navigation properties are not shared with any sibling CupertinoTabView nor any ancestor or descendant Navigator instances.

To push a route above this CupertinoTabView instead of inside it (such as when showing a dialog on top of all tabs), use Navigator.of(rootNavigator: true).

See also:

Inheritance

Constructors

CupertinoTabView({Key key, WidgetBuilder builder, String defaultTitle, Map<String, WidgetBuilder> routes, RouteFactory onGenerateRoute, RouteFactory onUnknownRoute, List<NavigatorObserver> navigatorObservers: const [] })
Creates the content area for a tab in a CupertinoTabScaffold.
const

Properties

builder WidgetBuilder
The widget builder for the default route of the tab view (Navigator.defaultRouteName, which is /). [...]
final
defaultTitle String
The title of the default route.
final
The list of observers for the Navigator created in this tab view. [...]
final
onGenerateRoute RouteFactory
The route generator callback used when the tab view is navigated to a named route. [...]
final
onUnknownRoute RouteFactory
Called when onGenerateRoute also fails to generate a route. [...]
final
routes Map<String, WidgetBuilder>
This tab view's routing table. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createState() → _CupertinoTabViewState
Creates the mutable state for this widget at a given location in the tree. [...]
override
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String name, DiagnosticsTreeStyle style }) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this object.
inherited
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited