number method
Implementation
num number(String key, {num defaultValue = 0}) {
if (containsKey(key)) {
if (this[key] is num) {
return this[key];
}
if (this[key] is String) {
return num.tryParse(this[key]) ?? defaultValue;
}
if (this[key] == null) {
return defaultValue;
}
}
return defaultValue;
}