set method
Sets value for given key with Duration
Implementation
void set(String key, dynamic value, {Duration? validFor}) {
_listeners.forEach((listener) {
listener.keySet(key);
});
this._map[key] = value;
if (validFor != null) {
this._map[_withValidSuffix(key)] =
DateTime.now().add(validFor).toIso8601String();
} else {
if (this._map.containsKey(_withValidSuffix(key))) {
this._map.remove(_withValidSuffix(key));
}
}
}