doubleValue static method

double? doubleValue(
  1. Map<String, dynamic>? info,
  2. String key, [
  3. bool strictType = true
])

Implementation

static double? doubleValue(Map<String,dynamic>? info, String key, [bool strictType = true]) {
  if (info == null) { return null; }
  final value = info[key];
  if (value != null && value is double) {
    return value;
  }
  if (strictType == false) {
    if (value != null && value is String) {
      return double.parse(value);
    }
  }
  return null;
}