configDouble function

double? configDouble(
  1. Map<String, Object?> json,
  2. String key
)

Reads a double value from json at key. Accepts both int and double. Returns null if missing or wrong type.

Implementation

double? configDouble(Map<String, Object?> json, String key) {
  final value = json[key];
  return value is num ? value.toDouble() : null;
}