SwiftPersisted<T> constructor
SwiftPersisted<T> (
- T initialValue,
- String _key,
- StorageBackend _storage, {
- T fromJson()?,
- Map<
String, dynamic> toJson(- T
- List<
MigrationConfig< ? migrations,T> > - int? currentVersion,
Implementation
SwiftPersisted(
super.initialValue,
this._key,
this._storage, {
this.fromJson,
this.toJson,
List<MigrationConfig<T>>? migrations,
int? currentVersion,
}) : _migrations = migrations,
_currentVersion = currentVersion {
_load();
}