getOrSetDefaultAsync<V> method
Gets key
value. If absent sets the key to defaultValue
and returns it.
Implementation
Future<V?> getOrSetDefaultAsync<V>(String key, dynamic defaultValue) async {
if (isLoaded) return getOrSetDefault<V>(key, defaultValue);
return _callLoaded<V?>(() => getOrSetDefault<V>(key, defaultValue));
}