isNumeric method

bool isNumeric()

Checks if the String is a number by attempting to parse it as a double. INFINITY and NaN are not treated as numbers.

'1.20'.isNumeric();
-> true

Implementation

bool isNumeric() => Type.isNumeric(this);