isDouble function
Returns true if value
is double. Can be a double as string too.
Implementation
bool isDouble(Object? value) {
if (value == null) return false;
if (value is double) return true;
if (value is num) return value.toDouble() == value;
var s = value.toString();
return double.tryParse(s) != null && int.tryParse(s) == null;
}