GetStoragePro class

A class providing utility methods for storing and retrieving objects using GetStorage.

Constructors

GetStoragePro.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

deleteAllObjects<T extends CommonDataClass<T>>() → void
Removes all objects of type T from storage.
deleteById<T extends CommonDataClass<T>>(String id) → void
Removes the object with the specified id of type T from storage.
eraseAll({bool eraseMainGetStorage = true}) Future<void>
Erases all objects of all types from storage.
getAllObjects<T extends CommonDataClass<T>>() List<T>
Retrieves all saved objects of type T from storage.
getObjectById<T extends CommonDataClass<T>>(String id) → T?
Retrieves an object of type T by its id from storage.
init() Future<void>
Start the storage drive. It's important to use await before calling this API, or side effects will occur.
listenAllObjects<T extends CommonDataClass<T>>({required dynamic onData(List<T>)}) → void
Listens for changes to all objects of type T.
listenForObjectChanges<T extends CommonDataClass<T>>({required String id, required dynamic onData(T?)}) → void
Listens for changes to the object with the specified id of type T.
saveObject<T extends CommonDataClass<T>>(CommonDataClass<T> data) → void
Saves a single object of type T to storage.
saveObjectsList<T extends CommonDataClass<T>>(List<CommonDataClass<T>> data) → void
Saves a list of objects of type T to storage.