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.isEmpty
no setter - isNotEmpty → bool
-
Helper getter to
_params.isNotEmpty
no 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
key
as is, without type checking if null returnsdefaultValue
-
getBool(
String key, [bool? defaultValue]) → bool -
returns the value corresponding with
key
as bool if null returnsdefaultValue
-
getDouble(
String key, [double? defaultValue]) → double -
returns the value corresponding with
key
as double if null returnsdefaultValue
-
getInt(
String key, [int? defaultValue]) → int -
returns the value corresponding with
key
as Int if null returnsdefaultValue
-
getNum(
String key, [num? defaultValue]) → num -
returns the value corresponding with
key
as num if null returnsdefaultValue
-
getString(
String key, [String? defaultValue]) → String -
returns the value corresponding with
key
as 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
key
as nullable bool if null returnsdefaultValue
-
optDouble(
String key, [double? defaultValue]) → double? -
returns the value corresponding with
key
as nullable double if null returnsdefaultValue
-
optInt(
String key, [int? defaultValue]) → int? -
returns the value corresponding with
key
as nullable Int if null returnsdefaultValue
-
optNum(
String key, [num? defaultValue]) → num? -
returns the value corresponding with
key
as nullable num if null returnsdefaultValue
-
optString(
String key, [String? defaultValue]) → String? -
returns the value corresponding with
key
corresponding withkey
as 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