VersionedPersistence<T> class
Versioned persistence with migration support.
- Inheritance
-
- Object
- SignalPersistence<
T> - VersionedPersistence
Constructors
-
VersionedPersistence({required String key, required int currentVersion, required SignalPersistence<
Map< storage, required T fromData(Map<String, dynamic> >String, dynamic> data, int version), required Map<String, dynamic> toData(T value), T migrate(Map<String, dynamic> oldData, int oldVersion, int newVersion)?})
Properties
- currentVersion → int
-
final
-
fromData
→ T Function(Map<
String, dynamic> data, int version) -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
final
-
migrate
→ T Function(Map<
String, dynamic> oldData, int oldVersion, int newVersion)? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
storage
→ SignalPersistence<
Map< String, dynamic> > -
final
-
toData
→ Map<
String, dynamic> Function(T value) -
final
Methods
-
delete(
) → Future< void> -
override
-
load(
) → Future< T?> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
T value) → Future< void> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited