toInt method

int toInt()

Converts the string into an integer.

Throws an error if the string is not a valid integer.

Implementation

int toInt() => int.parse(this);