toDouble property

double get toDouble

转double数据

Implementation

double get toDouble {
  if (this == null) {
    return 0;
  }
  try {
    if (this is double) {
      return this as double;
    } else {
      return double.tryParse("$this")??0;
    }
  } catch (e) {
    return 0;
  }
}