BaseSharedPreferences class Null safety
Base class if you want to create your own shared preferences impelementations.
See Also:
SharedPreferencesStorePlatform
Constructors
-
const
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
clear(
) → Future< bool> - Completes with true once the user preferences for the app has been cleared.
-
get(
String key) → Object? - Reads a value of any type from persistent storage.
-
isEmpty(
) → bool - Checkes wheather the storage is empty or not.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
remove(
String key) → Future< bool> - Removes an entry from persistent storage.
-
setBool(
String key, bool value) → Future< bool> -
Saves a boolean
value
to persistent storage in the background. -
setDouble(
String key, double value) → Future< bool> -
Saves a double
value
to persistent storage in the background. -
setInt(
String key, int value) → Future< bool> -
Saves an integer
value
to persistent storage in the background. -
setMockValue(
Map< String, Object> values) → void -
setString(
String key, String value) → Future< bool> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited