setValue method Null safety

void setValue(
  1. dynamic newValue,
  2. {String? forKey}
)

Save to persistent cache

Implementation

void setValue(dynamic newValue, {String? forKey}) {
  assert(forKey != null);
  if (forKey is String) {
    _storage[forKey] = newValue;
    _save();
  }
}