tryNum method

  1. @override
num? tryNum(
  1. K key, {
  2. num? min,
  3. num? max,
})
override

Returns a value at key as num or null if missing.

If provided min and max are used to clamp the returned value.

null is returned if an underlying value is unavailable or cannot be converted to num.

Implementation

@override
num? tryNum(K key, {num? min, num? max}) {
  try {
    return getNum(key, min: min, max: max);
  } on Exception {
    return null;
  }
}