FileSharedPreferencesPlatform class

Common typed adapter for desktop file storage. This library uses dart:io and is intentionally separate from the web-compatible platform-interface exports.

Inheritance

Constructors

FileSharedPreferencesPlatform(FilePreferencesStore store)
Creates an adapter with an injectable store.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
store → FilePreferencesStore
The transactional store used by this adapter.
final

Methods

clear({SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<void>
Clears all preferences for the configured options.
override
containsKey(String key, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<bool>
Returns whether a value exists for key.
override
getAll({SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<Map<String, Object>>
Returns all stored key-value pairs for the configured options.
override
getBool(String key, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<bool?>
Reads a boolean value for key.
override
getDouble(String key, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<double?>
Reads a double value for key.
override
getInt(String key, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<int?>
Reads an integer value for key.
override
getKeys({SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<Set<String>>
Returns all stored keys for the configured options.
override
getSnapshot({SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<PreferencesSnapshot>
Returns values and types from one read. Platforms whose runtime merges integer/double types should override this method with stored type metadata.
inherited
getString(String key, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<String?>
Reads a string value for key.
override
getStringList(String key, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<List<String>?>
Reads a string list for key.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String key, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<void>
Removes the preference for key.
override
setBool(String key, bool value, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<void>
Persists a boolean value for key.
override
setDouble(String key, double value, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<void>
Persists a double value for key.
override
setInt(String key, int value, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<void>
Persists an integer value for key.
override
setString(String key, String value, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<void>
Persists a string value for key.
override
setStringList(String key, List<String> value, {SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions()}) → Future<void>
Persists a string list value for key.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited