TabPage class

A page used to manage tab views. Its state object creates and manages a TabController that can be retrieved via TabPage.of(context).controller.

Inheritance
Mixed in types

Constructors

TabPage({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.
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) TabPageState
Retrieves the nearest TabPageState ancestor.