Parameter class

Used to apply special dependency injections or functionality to a function parameter.

Implemented by

Constructors

Parameter({String cookie, String query, String header, String session, dynamic match, dynamic defaultValue, bool required })
const

Properties

Inject the value of a request cookie.
final
defaultValue → dynamic
Specify a default value.
final
error → dynamic
Returns an error that can be thrown when the parameter is not present.
read-only
Inject the value of a request header.
final
match → dynamic
Only execute the handler if the value of this parameter matches the given value.
final
query String
Inject the value of a key from the query.
final
required bool
If true (default), then an error will be thrown if this parameter is not present.
final
session String
Inject the value of a key from the session.
final
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

getValue(RequestContext req) → dynamic
Obtains a value for this parameter from a RequestContext.
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