toInt method

int toInt({
  1. int defaultValue = 0,
})

Implementation

int toInt({int defaultValue = 0}) {
  return int.tryParse(this) ?? defaultValue;
}