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 returns defaultValue
getBool(String key, [bool? defaultValue]) bool
returns the value corresponding with key as bool if null returns defaultValue
getDouble(String key, [double? defaultValue]) double
returns the value corresponding with key as double if null returns defaultValue
getInt(String key, [int? defaultValue]) int
returns the value corresponding with key as Int if null returns defaultValue
getNum(String key, [num? defaultValue]) num
returns the value corresponding with key as num if null returns defaultValue
getString(String key, [String? defaultValue]) String
returns the value corresponding with key as String if null returns defaultValue
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 returns defaultValue
optDouble(String key, [double? defaultValue]) double?
returns the value corresponding with key as nullable double if null returns defaultValue
optInt(String key, [int? defaultValue]) int?
returns the value corresponding with key as nullable Int if null returns defaultValue
optNum(String key, [num? defaultValue]) num?
returns the value corresponding with key as nullable num if null returns defaultValue
optString(String key, [String? defaultValue]) String?
returns the value corresponding with key corresponding with key as nullable String if null returns defaultValue
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