DataStorageTools class

Managing local data storage

Constructors

DataStorageTools.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

getBoolean({required String key}) Future<bool>
Retrieves a boolean value stored locally associated with the given key.
getDouble({required String key}) Future<double>
Retrieves a double value stored locally for the given key.
getInteger({required String key}) Future<int>
Retrieves an integer value stored locally under the given key.
getListOfString({required String key}) Future<List<String>>
Retrieves a list of strings stored under the specified key.
getObjectOfString({required String key}) Future<Map<String, dynamic>>
Retrieves a stored JSON-encoded Map<String, dynamic> object by the given key.
getString({required String key}) Future<String>
Retrieves a string value stored under the specified key.
removeAll() Future<void>
Clears all locally stored data by invoking the platform-specific method.
removeByKey({required String key}) Future<void>
Removes a specific local data entry identified by key by invoking the platform-specific remove method.
storeBoolean({required String key, required bool value}) Future<void>
Stores a boolean value locally under the specified key.
storeDouble({required String key, required double value}) Future<void>
Stores a double value locally associated with the given key.
storeInteger({required String key, required int value}) Future<void>
Stores an integer value locally under the specified key.
storeListOfString({required String key, required List<String> value}) Future
Stores a list of strings under the specified key.
storeObjectOfString({required String key, required Map<String, dynamic> value}) Future
Stores a Map<String, dynamic> object as a JSON-encoded string under the specified key.
storeString({required String key, required String value}) Future
Stores a string value under the specified key.