toIntOrNull method

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

Parses the string as an int number and returns the result or null if the string is not a valid representation of a number.

The radix must be in the range 2..36. The digits used are first the decimal digits 0..9, and then the letters 'a'..'z' with values 10 through 35. Also accepts upper-case letters with the same values as the lower-case ones.

If no radix is given then it defaults to 10.

Implementation

int? toIntOrNull({int? radix}) => int.tryParse(this, radix: radix);