toDouble static method
Implementation
static double toDouble(String? s, {double defaultValue = 0}) {
if (s == null) return defaultValue;
try {
if (s == '' || s == 'null') {
return defaultValue;
}
double d = double.parse(s);
return d;
} catch (e) {
return defaultValue;
}
}