RouterState class

Application's router state.

Any change requires notifyListeners to be invoked in order for the router to update its state.

Inheritance
Available extensions

Constructors

RouterState(AuthService _auth, {RouteInformation? initial})

Properties

arguments Map<String, dynamic>?
Dynamic arguments of the route.
getter/setter pair
context BuildContext?
This router's global BuildContext to use in contextless scenarios.
getter/setter pair
delegate RouterDelegate<Object>
Application's RouterDelegate.
latefinal
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
lifecycle Rx<AppLifecycleState>
Reactive AppLifecycleState.
final
Indicator whether HomeView page navigation should be visible.
final
obscuring RxList<ModalRoute>
ModalRoutes obscuring any Navigator being built.
final
overlay OverlayState?
This router's global OverlayState to use in contextless scenarios.
getter/setter pair
parser RouteInformationParser<Object>
Application's RouteInformationParser.
latefinal
prefix RxnString
Reactive title prefix of the current browser tab.
final
profileSection Rx<ProfileTab?>
Current Routes.me page section.
final
provider RouteInformationProvider?
Application's optional RouteInformationProvider.
getter/setter pair
route String
Current route (last in the routes history).
no setter
routes RxList<String>
Routes history stack.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tab HomeTab
Current Routes.home tab.
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
auth() → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.auth page.
chat(ChatId id, {bool push = false, ChatItemId? itemId, ChatDirectLinkSlug? link}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.chats page.
chatInfo(ChatId id, {bool push = false}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.chatInfo page.
contact(UserId id, {bool push = false}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.contacts page.
dialog(Chat chat, UserId? me, {bool push = false, ChatItemId? itemId, ChatDirectLinkSlug? link}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.chats page respecting the possible chat being a dialog.
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
go(String to) → void
Sets the current route to to if guard allows it.
home({bool? signedUp}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.home page.

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.chatDirectLink page.
me() → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.me page.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
nowhere() → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.nowhere page.
pop([String? page]) → void
Removes the last route in the routes history.
push(String to) → void
Pushes to to the routes stack.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeWhere(bool predicate(String element)) → void
Removes the routes satisfying the provided predicate.
replace(String from, String to) → void
Replaces the provided from with the specified to in the routes.
style({bool push = false}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.style page.
support({bool push = false}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.support page.
toString() String
A string representation of this object.
inherited
user(UserId id, {bool push = false}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.user page.
work(WorkTab? tab, {bool push = false}) → void

Available on RouterState, provided by the RouteLinks extension

Changes router location to the Routes.work page.

Operators

operator ==(Object other) bool
The equality operator.
inherited