utils/src/storage_util library

Classes

StorageUtil

Functions

calcTemporaryDirectoryCacheSize() Future<String>
clearStorage() Future<bool>
clearTemporaryDirectoryCache() Future<bool>
decryptString(String string) String
encryptString(String string) String
getStorageBool(String key) Future<bool>
getStorageList(String key, {required String listKey, required dynamic onModels(Map<String, dynamic> json)}) Future<List>
var models = await getStorageList(_orderNoKey, listKey: _orderNoForUserKey, onModels: (json) { return BaseKeyValue.fromJson(json); });
getStorageMap(String key) Future<Map<String, dynamic>?>
getStorageString(String key) Future<String?>
removeStorage(String key) Future<bool>
setStorageBool(String key, bool value) Future<bool>
setStorageList(String key, {required String listKey, required List list}) Future<bool>
var models = await getStorageList(_orderNoKey, listKey: _orderNoForUserKey, onModels: (json) { return BaseKeyValue.fromJson(json); }); models.add(BaseKeyValue(key: "key", value: "${randomInt(100)}")); await setStorageList(_orderNoKey, listKey: _orderNoForUserKey, list: models);
setStorageMap(String key, Map<String, dynamic> value) Future<bool>
setStorageString(String key, String value) Future<bool>