tryInt method

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

Returns a value at key as int 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 int.

Implementation

@override
int? tryInt(K key, {int? min, int? max}) {
  try {
    return getInt(key, min: min, max: max);
  } on Exception {
    return null;
  }
}