getInt method Null safety

int getInt(
  1. {String? forKey}
)

Read as int from persistent cache

Implementation

int getInt({String? forKey}) {
  assert(forKey != null);
  final value = _storage[forKey];
  if (value == null) {
    return 0;
  }
  return value;
}