Router class

Route registration DSL.

Constructors

Router()
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
routes → List<RouteData>
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

domain([String? domain]) → Router
middleware([List<Middleware>? middleware]) → Router
name([String? name]) → Router
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prefix([String? prefix]) → Router
toString() → String
A string representation of this object.
inherited
where(String paramName, String regex) → Router
whereBool(String paramName) → Router
whereDouble(String paramName) → Router
whereInt(String paramName) → Router
whereString(String paramName) → Router

Operators

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

Static Methods

any(String path, Function action) → Router
basePrefix([String? prefix]) → void
copy(String path, Function action) → Router
delete(String path, Function action) → Router
get(String path, Function action) → Router
group(Function callback, {String? prefix = '', List<Middleware> middleware = const [], String? domain}) → void
lock(String path, Function action) → Router
options(String path, Function action) → Router
patch(String path, Function action) → Router
post(String path, Function action) → Router
propfind(String path, Function action) → Router
purge(String path, Function action) → Router
put(String path, Function action) → Router
resource(String path, dynamic controller, {String? prefix, List<Middleware>? middleware, String? domain, String regex = r'\d+(.\d+)?'}) → void
unlock(String path, Function action) → Router
url(String name, [Map<String, dynamic>? params]) → String