optInt method

int? optInt(
  1. String key
)

Gets the value for the given key, returns null if null or wrong type

Implementation

int? optInt(String key) {
  final value = _internalMap[key];
  return value is int ? value : null;
}