toInt static method

int toInt(
  1. dynamic d,
  2. int def
)

Converts to not-nullable int

Implementation

static int toInt(dynamic d, int def) {
  return toIntN(d) ?? def;
}