AbstractRouter class
抽象的路由系统,其包含绑定路径处理器、中间件以及根据路由信息解析路径获得上下文
An abstract routing system that includes a bound path processor, middleware, and context for resolving paths based on routing information.
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
handle(
String path, RouteHandler handler, [ String method = DEFAULT_METHOD ]) → void -
添加路径处理器函数
Add path processor function. [...] -
parse(
String path, [ String method = DEFAULT_METHOD ]) → RouterContext -
根据路径和方法解析出路由上下文
Parse the routing context based on the path and method. Thepath
to be parsed. eg: [...] -
use(
String path, List< RouteMiddleware> middlewares, [ String method = DEFAULT_METHOD ]) → void -
添加中间件
Add Some middlewares with some path. eg: [...] -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited