fromMapAsInt function
Returns the value from fromMap as an int if it is numeric
Implementation
int? fromMapAsInt(Map? map, dynamic key, {int? defaultValue}) {
dynamic value = fromMap(map, key, defaultValue: defaultValue);
if (isNumeric(value)) {
value = toInt(value);
} else {
value = defaultValue;
}
return value;
}