tryReadNum method

num? tryReadNum(
  1. dynamic source,
  2. dynamic key
)

Tries to read a numeric value from the source. If the value is not a number, it returns null.

Implementation

num? tryReadNum(source, key) {
  var value = readValue(source, key);
  return isNum(value) ? value as num : null;
}