IndexedPage class

A page for creating an indexed page, such as a tab bar. In most use cases, it's easier to use a TabPage or CupertinoTabPage.

This class is only for very custom cases that don't require a TabController or CupertinoTabController.

Inheritance
Mixed in types

Constructors

IndexedPage({required Widget child, required List<String> paths, Page pageBuilder(Widget child) = _defaultPageBuilder, TabBackBehavior backBehavior = TabBackBehavior.none})
Initializes the page with a list of child paths. The provided child will normally show some kind of indexed navigation, such as tabs.
const

Properties

arguments Object?
The arguments passed to this route.
finalinherited
backBehavior TabBackBehavior
Specifies how tabs behave when used with the system back button.
final
child Widget
The content to be shown in the Route created by this page.
final
hashCode int
The hash code for this object.
no setterinherited
key LocalKey?
The key associated with this page.
finalinherited
name String?
The name of the route (e.g., "/settings").
finalinherited
pageBuilder Page Function(Widget child)
Optional function to customize the Page created for this route. If this is null, a MaterialPage is used.
final
paths List<String>
A list of the child paths. These can be relative (for example 'one') or absolute (for example '/tabs/one').
final
restorationId String?
Restoration ID to save and restore the state of the Route configured by this page.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canUpdate(Page other) bool
Whether this page can be updated with the other page.
inherited
createRoute(BuildContext context) Route<void>
Creates the Route that corresponds to this page.
inherited
createState() PageState<StatefulPage>
Returns a state object for this page.
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

Static Methods

of(BuildContext context) IndexedPageState
Retrieves the IndexedPageState from the closest IndexPage ancestor.