BinaryPersistence<T> class

Binary persistence for custom serialization.

Inheritance

Constructors

BinaryPersistence({required String key, required T fromBytes(List<int> bytes), required List<int> toBytes(T value), required Future<List<int>?> read(String key), required Future<void> write(String key, List<int> bytes), required Future<void> remove(String key)})

Properties

fromBytes → T Function(List<int> bytes)
final
hashCode int
The hash code for this object.
no setterinherited
key String
final
read Future<List<int>?> Function(String key)
final
remove Future<void> Function(String key)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toBytes List<int> Function(T value)
final
write Future<void> Function(String key, List<int> bytes)
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