parseInt static method

int? parseInt(
  1. dynamic json
)

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;
  }
}