toDouble method
Implementation
double toDouble() {
if ((this ?? '').isEmpty) {
return 0;
} else {
try {
if (double.tryParse(this ?? '') == null) {
return 0;
} else {
return double.parse(this!.trim());
}
} on Exception {
return 0;
}
}
}