asNum function

num asNum(
  1. dynamic json,
  2. String key
)

Returns a num (int or double) for the value at key. Throws a FormatException if the value cannot be converted.

Implementation

num asNum(dynamic json, String key) {
  final value = _getJsonValueOrNull(json, key);
  return toNum(value);
}