readDouble method

double readDouble(
  1. dynamic source,
  2. dynamic key, {
  3. double defaultValue = -1.0,
})

Reads a double value from the source, and if not found, returns the provided defaultValue.

Implementation

double readDouble(source, key, {double defaultValue = -1.0}) {
  return tryReadDouble(source, key) ?? defaultValue;
}