toDouble method
Converts the string to a double, or returns null if conversion fails.
Implementation
double? toDouble() {
try {
if (isEmpty) {
return null;
}
return double.parse(this);
} catch (ex) {
debugPrint(ex.toString());
return null;
}
}