GetStorage class

Instantiate GetStorage to access storage driver apis

Constructors

GetStorage([String container = 'GetStorage', String? path, Map<String, dynamic>? initialData])
factory

Properties

changes → Map<String, dynamic>
no setter
hashCode → int
The hash code for this object.
no setterinherited
initStorage ↔ Future<bool>
Start the storage drive. Important: use await before calling this api, or side effects will happen.
getter/setter pair
listenable → ValueStorage<Map<String, dynamic>>
listenable of container
no setter
microtask → Microtask
final
queue ↔ GetQueue
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

erase() → Future<void>
clear all data on your container
getKeys<T>() → T
getValues<T>() → T
hasData(String key) → bool
return data true if value is different of null;
listen(VoidCallback value) → VoidCallback
Listen changes in your container
listenKey(String key, ValueSetter callback) → VoidCallback
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read<T>(String key) → T?
Reads a value in your container with the given key.
remove(String key) → Future<void>
remove data from container by key
save() → Future<void>
toString() → String
A string representation of this object.
inherited
write(String key, dynamic value) → Future<void>
Write data on your container
writeIfNull(String key, dynamic value) → Future<void>
Write data on your only if data is null
writeInMemory(String key, dynamic value) → void

Operators

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

Static Methods

init([String container = 'GetStorage']) → Future<bool>
Start the storage drive. It's important to use await before calling this API, or side effects will occur.