RouteUtils class

Constructors

RouteUtils()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
routeWidgets Map<String, WidgetBuilder>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addWidget(String routeName, WidgetBuilder? widgetBuilder) → void
添加路由组件 routeName 路由名称 widgetBuilder 组件
addWidgets(Map<String, dynamic> widgets) → void
添加路由组件
finish(String routeName) → void
销毁页面 routeName 路由名称或路径
finishList(List<String> routeNames) → void
销毁指定的所有页面 routeNames 需要销毁页面的路由集合
finishToRoot() → void
销毁页面到根页面
getArguments(String routeName) Map<String, String>
获取路由参数 routeName 路由名称
getWidget(String routeName) WidgetBuilder?
获取路由对应组件 routeName 路由名称
go(String routeName, {String? url, String? title, Map<String, dynamic>? arguments}) → void
页面跳转 routeName 路由名称 url 如果是web页面该项必填 title h5标题 arguments 参数
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postBack(List<String> routeNames, {String? action, Map<String, dynamic>? arguments}) → void
回传数据(接收对象需要实现RouteStateNotification) routeNames 数据回传的目标路由名称 stateInstance 页面对象 arguments 回传数据
removeRouteCache(String routeName) → void
移除路由缓存 routeName 路由名称或路径
rootRouteNames() List<String>
route(String routeName, RouteEvent routeEvent, {Map<String, dynamic>? arguments}) String
获取路由 routeName 路由名称 routeEvent 用于区分页面路由、事件路由 arguments 路由参数
routeCount({List<String> ruleOutRouteNames = const []}) int
统计路由数 ruleOutRouteNames 排除统计的路由
routePage(String routeName, {Map<String, dynamic>? arguments}) String
获取页面路由 routeName 路由名称 arguments 路由参数
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance RouteUtils
no setter