NumQueryParam class final
A query parameter accessor that parses values as num.
Accepts both integer and decimal values from the query string.
Example:
const amountParam = NumQueryParam('amount');
Result handler(Request req) {
final amount = req.queryParameters.get(amountParam);
return Response.ok();
}
- Inheritance
-
- Object
- ReadOnlyAccessor<
num, String, RawQueryParam> - FunctionAccessor<
num, String, RawQueryParam> - QueryParam<
num> - NumQueryParam
Constructors
- NumQueryParam(String key)
-
const
Properties
Methods
-
decode(
RawQueryParam raw) → num -
Decodes
rawinto the typed value.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited