SimplePersistence<T> class

Simple string persistence for primitive types.

Inheritance

Constructors

SimplePersistence({required String key, required T fromString(String value), required String toStringValue(T value), required Future<String?> read(String key), required Future<void> write(String key, String value), required Future<void> remove(String key)})

Properties

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