FastRouter class

路由使用

Constructors

FastRouter()

Properties

hashCode int
The hash code for this object.
no setterinherited
notFoundHandler Handler?
未定义路线时的通用处理
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

define(String routePath, {required Handler handler, TransitionType? transitionType}) → void
为传递的RouteHandler创建PageRoute定义。您可以选择提供默认的过渡类型。
generator(RouteSettings routeSettings) Route?
Route generation method. This function can be used as a way to create routes on-the-fly if any defined handler is found. It can also be used with the MaterialApp.onGenerateRoute property as callback to create routes that can be used with the Navigator class.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printTree() → void
打印路由树,以便于您对其进行分析。
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

context BuildContext
观察者对象的上下文
no setter
observer RouterObserver
自定义路由观察者
no setter
router FastRouter
no setter

Static Methods

configureRouters(FastRouter config, List<ModuleRouter> listRouter, {Handler? emptyPage, Duration? transitionDuration}) → void
配置路由
popBack({String? targetPath, String? openPage, dynamic result}) → dynamic
targetPath目标页面 openPage打开页面 result数据
popBackDialog(BuildContext context) → dynamic
dialog pop
push(String path, {String? targetPath, bool replace = false, Object? arguments, RouterCallback? callback, TransitionType? transition, Duration? transitionDuration, RouteTransitionsBuilder? transitionBuilder}) → dynamic