asInt method

int asInt([
  1. int? defaultValue
])

If object is int then return it otherwise throw FormatException

Implementation

int asInt([int? defaultValue]) {
  return _getValue<int>(defaultValue);
}