toDoubleN static method
Converts to nullable double
Implementation
static double? toDoubleN(dynamic d) {
if (d is double) {
return d;
}
if (d is int) {
return d.toDouble();
}
if (d is String) {
return double.tryParse(d);
}
return null;
}