utils/storage library

Functions

getStorageItem({required String key}) Future
Retrieves the value associated with the given key from the storage. If the value is null, returns null. If the value is a JSON string, decodes it and returns the value of the key. If the value is not a JSON string, returns the value as is. Throws an exception if there is an error while retrieving the item.
initializeStorage() Future<void>
Initializes the storage with the required fields.
setStorageItem({required String key, dynamic value}) Future<void>
Sets the value of a storage item with the specified key.