RequestParams class
Manages request parameters and custom attributes.
Handles path parameters from routing and custom attributes set during request processing.
Properties
-
all
→ Map<
String, String> -
Gets all path parameters.
no setter
- attributeCount → int
-
Gets attributes count.
no setter
-
attributeKeys
→ Iterable<
String> -
Gets attribute keys.
no setter
-
attributes
→ Map<
String, dynamic> -
Gets all custom attributes.
no setter
- attributeValues → Iterable
-
Gets attribute values.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- paramCount → int
-
Gets path parameters count.
no setter
-
paramKeys
→ Iterable<
String> -
Gets path parameter keys.
no setter
-
paramValues
→ Iterable<
String> -
Gets path parameter values.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allData(
) → Map< String, dynamic> - Gets all parameters and attributes combined.
-
attribute<
T> (String key) → T? - Gets a custom attribute.
-
attributeOr<
T> (String key, T defaultValue) → T - Gets attribute with default.
-
clearAttributes(
) → void - Clears all attributes.
-
clearParams(
) → void - Clears all path parameters.
-
hasAllAttributes(
List< String> keys) → bool - Checks if multiple attributes exist.
-
hasAllParams(
List< String> keys) → bool - Checks if multiple path parameters exist.
-
hasAttribute(
String key) → bool - Checks if attribute exists.
-
hasParam(
String key) → bool - Checks if path parameter exists.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
param(
String key) → String? - Gets a path parameter.
-
paramBool(
String key) → bool - Gets path parameter as bool.
-
paramDouble(
String key) → double? - Gets path parameter as double.
-
paramInt(
String key) → int? - Gets path parameter as int.
-
paramOr(
String key, String defaultValue) → String - Gets path parameter with default.
-
paramTyped<
T> (String key) → T? - Gets typed path parameter.
-
removeAttribute(
String key) → void - Removes a custom attribute.
-
removeParam(
String key) → void - Removes a path parameter.
-
setAttribute(
String key, dynamic value) → void - Sets a custom attribute.
-
setParam(
String key, String value) → void - Sets a path parameter.
-
toMap(
) → Map< String, dynamic> - Converts to map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited