PageTabController class
A controller class for managing the state of a scaffold builder.
This class extends ValueNotifier and provides methods for navigating between different pages and tabs within the scaffold builder.
- Inheritance
- Mixed-in types
Constructors
- PageTabController({int defaultPageIndex = 0, int defaultTabIndex = 0})
- Creates a new instance of PageTabController.
Properties
- canGoBack → bool
-
Returns a boolean value indicating whether there is a previous index in the
history list.
no setter
- currentContext → BuildContext?
-
The build context in which the widget with this key builds.
no setterinherited
- currentPage → PageEntry
-
Returns the current page.
no setter
- currentRoute → String
-
Returns the current route.
no setter
- currentState → _PageTabScaffoldState?
-
The State for the widget in the tree that currently has this global key.
no setterinherited
- currentTab → TabEntry
-
Returns the current tab.
no setter
- currentWidget → Widget?
-
The widget in the tree that currently has this global key.
no setterinherited
- defaultIndex → (int, int, DateTime)
-
Returns the default index.
no setter
- defaultPageIndex → int
-
Returns the default page index.
no setter
- defaultTabIndex → int
-
Returns the default tab index.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
history
→ List<
(int, int, DateTime)> -
Returns the history list.
no setter
-
historyPages
→ Iterable<
PageEntry> -
Returns the history pages.
no setter
-
historyPageTabs
→ Iterable<
(PageEntry, TabEntry, DateTime)> -
Returns the history page tabs.
no setter
- isEmpty → bool
-
Whether the page count is zero.
no setter
- isNotEmpty → bool
-
Whether the page count is not zero.
no setter
- isSearching ↔ bool
-
Whether the search is active.
getter/setter pair
- isSinglePage → bool
-
Whether there is a single page.
no setter
- onSearch → void Function(String value)?
-
Returns the search callback function.
no setter
- pageCount → int
-
Returns the page count.
no setter
- pageIndex ↔ int
-
Returns the current page index.
getter/setter pair
-
pages
→ List<
PageEntry> -
Returns the list of pages.
no setter
- previous → (PageEntry, TabEntry, DateTime)
-
Returns the previous page, tab, and date.
no setter
- previousIndex → (int, int, DateTime)
-
Returns the previous index.
no setter
- previousPage → PageEntry
-
Returns the previous page.
no setter
- previousPageIndex → int
-
Returns the previous page index.
no setter
- previousTab → TabEntry
-
Returns the previous tab.
no setter
- previousTabIndex → int
-
Returns the previous tab index.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- search ↔ String
-
Gets or sets the search text.
getter/setter pair
- stateLoaded → bool
-
Whether the state is loaded.
no setter
- tabIndex ↔ int
-
Gets or sets the current tab index.
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
back(
[int count = 1]) → void - Navigates back to the previous page and tab indices.
-
backTo(
int pageIndex, int tabIndex) → void - Navigates back to the specified page and tab indices.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
insertHistory(
int pageIndex, int tabIndex, [DateTime? timestamp]) → (int, int, DateTime) - Inserts a history entry with the specified page and tab indices.
- Navigates to the specified page and tab indices.
- Navigates to the specified route.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
) → void - Resets the indexes and history list to their default values.
-
route(
int pageIndex, [int tabIndex = 0]) → String - Returns the route for the specified page and tab indices.
-
routeTitle(
int pageIndex, [int tabIndex = 0]) → String - Returns the route title for the specified page and tab indices.
-
showHistoryMenu(
BuildContext context, Offset position, [String? format, String? locale]) → void - Shows the history menu at the specified position.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited