toInt property

int get toInt

Implementation

int get toInt {
  if (this.isEmptyString) {
    return 0;
  }
  try {
    return int.tryParse("$this") ?? 0;
  } catch (e) {
    return 0;
  }
}