NyBackpack<T> extension

on

Methods

addToCollection(dynamic value, {bool allowDuplicates = true}) → dynamic

Available on String, provided by the NyBackpack extension

Add a value to a collection in NyStorage You can also set allowDuplicates to false to prevent duplicates
deleteFromStorage({bool andFromBackpack = false}) → dynamic

Available on String, provided by the NyBackpack extension

Delete a StorageKey value from NyStorage
fromBackpack<T>({dynamic defaultValue}) → T?

Available on String, provided by the NyBackpack extension

Read a value from the Backpack instance.
fromStorage<T>({dynamic defaultValue}) Future<T?>

Available on String, provided by the NyBackpack extension

Read a StorageKey value from NyStorage
read<T>({dynamic defaultValue}) Future<T?>

Available on String, provided by the NyBackpack extension

Read a StorageKey value from NyStorage
readCollection<T>() Future<List<T>>

Available on String, provided by the NyBackpack extension

Read a collection from NyStorage
readJson<T>({dynamic defaultValue}) Future<T?>

Available on String, provided by the NyBackpack extension

Read a JSON value from NyStorage
store(dynamic value, {bool inBackpack = false}) → dynamic

Available on String, provided by the NyBackpack extension

Store a value in NyStorage You can also store a value in the backpack by setting inBackpack to true
storeJson(dynamic value, {bool inBackpack = false}) → dynamic

Available on String, provided by the NyBackpack extension

Store a JSON value in NyStorage You can also store a value in the backpack by setting inBackpack to true