PrfVariableExtensions<T> extension
Extensions on PrfVariable that provide convenient methods for accessing and manipulating persisted values.
These extensions simplify working with stored preferences by handling the SharedPreferences instance internally, allowing for cleaner, more readable code.
- on
-
- PrfVariable<
T>
- PrfVariable<
Methods
-
existsOnPrefs(
) → Future< bool> -
Available on PrfVariable<
Checks if the key exists in SharedPreferences.T> , provided by the PrfVariableExtensions extension -
get(
) → Future< T?> -
Available on PrfVariable<
Gets the stored value associated with this variable.T> , provided by the PrfVariableExtensions extension -
getOrFallback(
T fallback) → Future< T> -
Available on PrfVariable<
Gets the stored value or returns a fallback if the value is null.T> , provided by the PrfVariableExtensions extension -
isNull(
) → Future< bool> -
Available on PrfVariable<
Checks if the current value is null in storage.T> , provided by the PrfVariableExtensions extension -
remove(
) → Future< void> -
Available on PrfVariable<
Removes the value from persistent storage.T> , provided by the PrfVariableExtensions extension -
set(
T value) → Future< bool> -
Available on PrfVariable<
Sets the value for this variable in persistent storage.T> , provided by the PrfVariableExtensions extension