Parameters class
This class helps read typed data from raw maps, it's used for both path-parameters and query-parameters
Constructors
-
Parameters(Map<
String, dynamic> ? params) -
default construct
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → bool
-
Helper getter to
_params.isEmptyno setter - isNotEmpty → bool
-
Helper getter to
_params.isNotEmptyno setter -
rawMap
→ Map<
String, dynamic> -
returns the raw map passed to the constructor
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
get(
String key, [dynamic defaultValue]) → dynamic -
returns the value corresponding with
keyas is, without type checking if null returnsdefaultValue -
getBool(
String key, [bool? defaultValue]) → bool -
returns the value corresponding with
keyas bool if null returnsdefaultValue -
getDouble(
String key, [double? defaultValue]) → double -
returns the value corresponding with
keyas double if null returnsdefaultValue -
getInt(
String key, [int? defaultValue]) → int -
returns the value corresponding with
keyas Int if null returnsdefaultValue -
getList(
String key, [List< String> ? defaultValue]) → List<String> -
returns the value corresponding with
keyas nullable List<String> -
getNum(
String key, [num? defaultValue]) → num -
returns the value corresponding with
keyas num if null returnsdefaultValue -
getString(
String key, [String? defaultValue]) → String -
returns the value corresponding with
keyas String if null returnsdefaultValue -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
optBool(
String key, [bool? defaultValue]) → bool? -
returns the value corresponding with
keyas nullable bool if null returnsdefaultValue -
optDouble(
String key, [double? defaultValue]) → double? -
returns the value corresponding with
keyas nullable double if null returnsdefaultValue -
optInt(
String key, [int? defaultValue]) → int? -
returns the value corresponding with
keyas nullable Int if null returnsdefaultValue -
optList(
String key, [List< String> ? defaultValue]) → List<String> ? -
returns the value corresponding with
keyas nullable List<String> if null returnsdefaultValue -
optNum(
String key, [num? defaultValue]) → num? -
returns the value corresponding with
keyas nullable num if null returnsdefaultValue -
optString(
String key, [String? defaultValue]) → String? -
returns the value corresponding with
keycorresponding withkeyas nullable String if null returnsdefaultValue -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
Parameters other) → Parameters - merges the value of two instances of Parameters classes and returns a new instance containing the merged values.
-
operator ==(
Object other) → bool -
The equality operator.
override