toInt property

int? toInt

Convert string to int

Implementation

int? get toInt {
  try {
    return double.tryParse(this)?.toInt();
  } catch (e) {
    return null;
  }
}