toInt method

num toInt({
  1. int radix = 10,
})

Converts the string to a num. radix is the base for integer parsing.

Implementation

num toInt({int radix = 10}) => int.tryParse(this, radix: radix) ?? double.tryParse(this)?.toInt() ?? double.nan;