PrfBytes class
A cached preference for Uint8List.
This class is deprecated. Use Prf directly instead.
Example:
final bytes = Prf<Uint8List>('bytes');
- Inheritance
-
- Object
- BasePrfObject<
Uint8List> - CachedPrfObject<
Uint8List> - Prf<
Uint8List> - PrfBytes
- Annotations
-
- @Deprecated('Use Prf<Uint8List> directly instead. This class will be removed in a future version.')
Constructors
- PrfBytes.new(String key, {Uint8List? defaultValue})
- Creates a new cached bytes preference.
Properties
-
adapter
→ PrfAdapter<
Uint8List> -
The adapter used to convert between the type
T
and SharedPreferences.no setterinherited - cachedValue → Uint8List?
-
Returns the currently cached value without accessing SharedPreferences.
no setterinherited
- defaultValue → Uint8List?
-
Optional default value to use when no value exists for key.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isolated
→ PrfIso<
Uint8List> -
Creates an isolate-safe version of this preference.
no setterinherited
- key → String
-
The key used to store this preference in SharedPreferences.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getValue(
SharedPreferencesAsync prefs) → Future< Uint8List?> -
Gets the value, using the cached value if available or reading from storage if not.
inherited
-
init(
) → Future< void> -
Initializes the cache by loading the current value from storage.
inherited
-
initCache(
SharedPreferencesAsync prefs) → Future< void> -
Initializes the cache by reading the current value from SharedPreferences.
inherited
-
isValueNull(
SharedPreferencesAsync prefs) → Future< bool> -
Checks if the stored value is null.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeValue(
SharedPreferencesAsync prefs) → Future< void> -
Removes the value from SharedPreferences and clears the cached value.
inherited
-
setValue(
SharedPreferencesAsync prefs, Uint8List value) → Future< void> -
Stores
value
in SharedPreferences and updates the cached value.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited