$double static method

double? $double(
  1. dynamic json,
  2. String key
)

Implementation

static double? $double(dynamic json, String key) {
  final value = _getJsonValue(json, key);
  if (value == null) return null;
  if (value is double) return value;
  if (value is int || value is num) return value.toDouble();
  return double.tryParse(value.toString());
}