getNumber method

num? getNumber(
  1. String key
)

Access a num value.

Returns null if there is no such key or if it is not a num.

Implementation

num? getNumber(String key) {
  if (get(key) is! num) {
    return null;
  }

  return get(key);
}