NyStorageKey extension
Methods
-
addToCollection<T>(dynamic value, {bool allowDuplicates = true})
→ dynamic
-
Add a value to a collection in NyStorage
You can also set
allowDuplicates
to false to prevent duplicates
-
defaultValue<T>(dynamic value)
→ Future Function(bool inBackpack)?
-
Set a default value for a StorageKey
-
deleteFromStorage({bool andFromBackpack = true})
→ dynamic
-
Delete a StorageKey value from NyStorage
-
flush({bool andFromBackpack = true})
→ dynamic
-
Flush data from NyStorage
-
fromBackpack<T>({dynamic defaultValue})
→ T?
-
Read a value from the Backpack instance.
-
fromStorage<T>({dynamic defaultValue})
→ Future<T?>
-
Read a StorageKey value from NyStorage
-
read<T>({dynamic defaultValue})
→ Future<T?>
-
Read a StorageKey value from NyStorage
-
readCollection<T>()
→ Future<List<T>>
-
Read a collection from NyStorage
-
readJson<T>({dynamic defaultValue})
→ Future<T?>
-
Read a JSON value from NyStorage
-
save(dynamic value, {bool inBackpack = false})
→ dynamic
-
Store a value in NyStorage
You can also save a value in the backpack by setting
inBackpack
to true
-
saveJson(dynamic value, {bool inBackpack = false})
→ dynamic
-
Store a JSON value in NyStorage
You can also save a value in the backpack by setting
inBackpack
to true
-
toModel<T>()
→ T
-
Attempt to convert a String into a model by using your model decoders.