toDouble method

double toDouble()

Implementation

double toDouble() {
  if ((this ?? '').isEmpty) {
    return 0;
  } else {
    try {
      return double.parse(this!);
    } on Exception {
      return 0;
    }
  }
}