isNumeric method

  1. @useResult
bool isNumeric()

Returns true if this string can be parsed as a number.

Implementation

@useResult
bool isNumeric() =>
    // Attempt to parse as a double and check if the result is not null.
    double.tryParse(this) != null;