isDouble method

bool isDouble()

Checks if the string represents a double value.

Example:

print('3.14'.isDouble()); // true
print('10'.isDouble()); // true
print('abc'.isDouble()); // false

Implementation

bool isDouble() => double.tryParse(this) != null;