toDouble method
parse dynamic to int used when parsing json
Implementation
double toDouble() {
if (this == null) return 0;
if (this is int) return this;
if (this is double) return this;
if (this is String) return double.parse(this);
return 0;
}