getDouble method

double getDouble(
  1. String key, {
  2. double defaultValue = defaultDouble,
})

Reads a key value of double type from Map.

If value is NULL or not double type return default value defaultDouble

Implementation

double getDouble(String key, {double defaultValue = defaultDouble}) {
  if (containsKey(key)) return toDouble(this[key] ?? defaultValue);
  errorLogsNS("Map.getDouble[$key] has incorrect data : ${this[key]}");
  return defaultValue;
}