intValue static method
Implementation
static int intValue(Map<String, Object?> src, String field, {int nullValue = 0,}) {
Object? value = src[field];
if (value.runtimeType == int) {
// must be int
return value as int;
}
if (value.runtimeType == Null) {
// if value is null.
return nullValue;
}
return nullValue;
}