Route class

Route

A http route

Constructors

Route(String method, String path)

Properties

aliases List<String>
Get route aliases
no setter
argsOrder List<String>
Order of arguments
no setterinherited
description String
Description
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hook bool
Whether or not hook is enabled
getter/setter pair
injections List<String>
Injections
no setterinherited
labels Map<String, dynamic>
final
method String
HTTP method
getter/setter pair
order int
getter/setter pairinherited
params Map<String, Param>
Parameters
no setterinherited
path String
Route path
getter/setter pair
pathParams Map<String, int>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

action(Function action) → Hook
Hooks action to be executed when executing hook
inherited
alias(String path) Route
Add a route alias
desc(String description) → Hook
Set hook description
inherited
getAction() Function
Get action
inherited
getGroups() List<String>
Get groups
inherited
getLabel(String key, {String? defaultValue}) String?
Get route label
getPathValues(Request request) Map<String, String>
Get values for path params
groups(List<String> groups) → Hook
Set hook groups
inherited
inject(String injection) → Hook
Inject dependencies
inherited
label(String key, String value) Route
Set route label
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
param({required String key, dynamic defaultValue, Validator? validator, String description = '', bool optional = false}) → Hook
Set hook param
inherited
setPathParam(String key, int index) → void
Set path params
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

counter int
getter/setter pair