DataPersistor class

Saves, gets and removes data locally

Supports text and raw data (saveString) Supports images, audios and raw bytes (saveImage) Supports objects in JSON format (saveObject)

Constructors

DataPersistor()

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

getBytes(String path) Future<Uint8List>
Gets media bytes with given path as String
getImage(String path) Future<Uint8List>
Gets media bytes with given path as String
getObject(String path) Future<Map<String, dynamic>>
Gets json object with given path as String
getString(String path) Future<String>
Gets text with given path as String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeObject(String path) Future<void>
Removes object with given path as String
saveImage(String path, Uint8List image) Future<String>
Supports images,videos, audios and raw bytes
saveObject(String path, dynamic object) Future<bool>
Supports objects in JSON format as Map<String, dynamic>
saveString(String path, String value) → void
Supports text and raw data as String
toString() String
A string representation of this object.
inherited

Operators

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