flutter-freaccess-hub/lib/shared/utils/cache_util.dart

20 lines
323 B
Dart

class CacheUtil {
static final Map<String, dynamic> _cache = {};
static void set(String key, dynamic value) {
_cache[key] = value;
}
static dynamic get(String key) {
return _cache[key];
}
static void delete(String key) {
_cache.remove(key);
}
static void clear() {
_cache.clear();
}
}