toInt static method

dynamic toInt(
  1. dynamic value
)

Implementation

static toInt(value) {
  if (typeOf(value) == 'double') {
    return value == value.toInt() ? value.toInt() : value;
  } else {
    return value;
  }
}