toDouble static method

double toDouble(
  1. dynamic d,
  2. double def
)

Converts a dynamic value to a non-nullable double.

d - The dynamic value to be converted. def - The default double value if conversion fails. Returns a double.

Implementation

static double toDouble(dynamic d, double def) {
  return toDoubleN(d) ?? def;
}