toDoubleOrNull method

double? toDoubleOrNull()

Returns the value of this number as an double or null if can not be parsed.

Implementation

double? toDoubleOrNull() {
  if (this == null) return null;
  return double.tryParse(this!);
}