toDouble method

double? toDouble({
  1. double defValue = 0,
})

转为double类型

Implementation

double? toDouble({double defValue = 0}) {
  if (this == null) {
    return null;
  }
  return double.tryParse(this!) ?? defValue;
}