MapGetOrDefault<K, V> extension

Returns the element of given key in Map.

on

Methods

getDoubleOrDefault(K key, double? defaultValue) double?

Available on Map<K, V>, provided by the MapGetOrDefault extension

Returns the double value associated with the given key, or defaultValue if the key does not exist or cannot be converted to double.
getIntOrDefault(K key, int? defaultValue) int?

Available on Map<K, V>, provided by the MapGetOrDefault extension

Returns the integer value associated with the given key, or defaultValue if the key does not exist or cannot be converted to int.
getNumOrDefault(K key, num? defaultValue) num?

Available on Map<K, V>, provided by the MapGetOrDefault extension

Returns the numeric value associated with the given key, or defaultValue if the key does not exist or cannot be converted to num.
getOrDefault(K key, V? defaultValue) → V?

Available on Map<K, V>, provided by the MapGetOrDefault extension

Returns the value associated with the given key,
getStringOrDefault(K key, String? defaultValue) String?

Available on Map<K, V>, provided by the MapGetOrDefault extension

Returns the string value associated with the given key, or defaultValue if the key does not exist.