SharedPrefsStorage class
A TimerStorage implementation that uses the shared_preferences package.
This class handles the physical reading and writing of integer values to the device's local disk, ensuring that timer data persists even if the app process is terminated.
- Implemented types
Constructors
-
Creates a SharedPrefsStorage instance with a specific
key.
Properties
Methods
-
clear(
) → Future< void> -
Removes the value associated with the assigned key
from the device's persistent storage.
override
-
loadSeconds(
) → Future< int?> -
Reads the stored integer value from the device's disk.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveSeconds(
int seconds) → Future< void> -
Writes the provided
secondsto the device's persistent storage using the assigned key.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited