MapGetOrDefault<K, V> extension
Returns the element of given key in Map.
- on
-
- Map<
K, V>
- Map<
Methods
-
getDoubleOrDefault(
K key, double? defaultValue) → double? -
Available on Map<
Returns the double value associated with the givenK, V> , provided by the MapGetOrDefault extensionkey
, ordefaultValue
if the key does not exist or cannot be converted todouble
. -
getIntOrDefault(
K key, int? defaultValue) → int? -
Available on Map<
Returns the integer value associated with the givenK, V> , provided by the MapGetOrDefault extensionkey
, ordefaultValue
if the key does not exist or cannot be converted toint
. -
getNumOrDefault(
K key, num? defaultValue) → num? -
Available on Map<
Returns the numeric value associated with the givenK, V> , provided by the MapGetOrDefault extensionkey
, ordefaultValue
if the key does not exist or cannot be converted tonum
. -
getOrDefault(
K key, V? defaultValue) → V? -
Available on Map<
Returns the value associated with the givenK, V> , provided by the MapGetOrDefault extensionkey
, -
getStringOrDefault(
K key, String? defaultValue) → String? -
Available on Map<
Returns the string value associated with the givenK, V> , provided by the MapGetOrDefault extensionkey
, ordefaultValue
if the key does not exist.