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.
no setteroverride
initialData Map<String, dynamic>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateFile Future<File>
no setter

Methods

clear() Future<void>
override
load() Future<Map<String, dynamic>?>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(Map<String, dynamic>? data) Future<void>
override
toString() String
A string representation of this object.
inherited

Operators

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