toInt method

int? toInt({
  1. int? radix,
})

Tries to parse the string as an integer and returns the result.

Returns null if the string cannot be parsed as an integer.

Implementation

int? toInt({int? radix}) {
  return int.tryParse(this, radix: radix);
}