bodyAsInteger method

int bodyAsInteger()

Implementation

int bodyAsInteger() {
  if (data is String) {
    return int.parse(data);
  }
  if (data is num) {
    return data.toInt();
  }
  return data;
}