JsonFileStorage class

Uses the default JsonCodec, to store the persisted state.

Inheritance

Constructors

JsonFileStorage({String filename: 'data.json', Map<String, dynamic> initialData: const {}, bool clearDataOnLoadError: false})
const

Properties

clearDataOnLoadError bool
final
filename String
final
hashCode int
The hash code for this object. [...]
read-only, override
initialData Map<String, dynamic>
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stateFile Future<File>
read-only

Methods

clear() Future<void>
override
load() Future<Map<String, dynamic>>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
save(Map<String, dynamic> data) Future<void>
override
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
override