RxRouter class

RxRouter 是 RxFlare 路由系统的核心管理器。

它负责管理全局路由栈 (memPages)、多 Tab 局部栈 (tabPages)、 路由跳转 (to)、返回 (back) 以及参数存取。

Properties

activeTabIndex RxState<int>
当前激活的 Tab 索引。
final
current RxPage?
获取当前视口顶部的页面信息。
no setter
hashCode int
The hash code for this object.
no setterinherited
initialRoute String
getter/setter pair
memPages RxState<List<RxPage>>
根路由栈。负责全局大局逻辑,如:登录页、主页、全屏弹窗等。
final
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tabPages Map<int, RxState<List<RxPage>>>
多 Tab 局部栈集合。Key 为 Tab 索引,Value 为该 Tab 独立的路由栈。
final

Methods

args<T>() → T?
获取当前页面的自定义参数对象。
back<T>({T? result}) → void
返回上一页。
ensureInitialized() → void
initTab(int index, List<RxPage> initial) → void
初始化指定索引的 Tab 路由栈。
initTabIfNeeded(int index, List<RxPage> initial) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pageId() String?
param(String key) String?
获取指定 Key 的路径参数值。
params() Map<String, String>
query() Map<String, String>
queryItem(String key) String?
获取指定 Key 的 Query 参数值。
register(Map<String, RxDef> map) → void
注册路由定义表。
switchTab(int index) → void
切换当前激活的 Tab。
to<T>(String path, {dynamic arguments}) Future<T?>
跳转至指定路径。
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

I RxRouter
获取 RxRouter 的单例实例。
final