getAsDouble method
Retrieves the element of key
of type double from Map.
If Map has no element of key
, or if the type does not match double, or if Map is itself Null, orElse
is returned.
Implementation
double getAsDouble(K key, [double orElse = 0.0]) {
assert(key != null, "The key is empty.");
if (this == null || !containsKey(key) || this![key] is! num?) {
return orElse;
}
return (this![key] as num?)?.toDouble() ?? orElse;
}