parseInt static method
Implementation
static int? parseInt(dynamic json) {
if (json is String) {
return int.tryParse(json);
} else if (json is double) {
return json.floor();
} else {
return json;
}
}
static int? parseInt(dynamic json) {
if (json is String) {
return int.tryParse(json);
} else if (json is double) {
return json.floor();
} else {
return json;
}
}