getInteger method

int? getInteger(
  1. String key
)

Access an int value.

Returns 0 if there is no such key or if it is not a int.

Implementation

int? getInteger(String key) {
  if (get(key) is! int) {
    return null;
  }

  return get(key);
}