BinaryListAdapter<T> class
abstract
An abstract adapter for encoding and decoding lists of binary data.
This adapter handles the conversion between a list of type T
and a
Base64-encoded String for storage in SharedPreferences. It uses a
specified byte size to read and write binary data.
Subclasses must implement the read and write methods to define
how individual elements of type T
are read from and written to
binary data.
- Inheritance
-
- Object
- PrfAdapter<
List< T> > - PrfEncodedAdapter<
List< T> , String> - BinaryListAdapter
- Implementers
Constructors
- BinaryListAdapter.new(int byteSize)
-
Creates a new BinaryListAdapter with the given
byteSize
.const
Properties
Methods
-
decode(
String? base64String) → List< T> ? -
Decodes a Base64-encoded String into a list of elements of type
T
.override -
encode(
List< T> values) → String -
Encodes a list of elements of type
T
into a Base64-encoded String.override -
getter(
SharedPreferencesAsync prefs, String key) → Future< List< T> ?> -
Retrieves a value of type
T
from SharedPreferences.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
ByteData data, int offset) → T -
Reads an element of type
T
from the given ByteData starting at the specifiedoffset
. -
setter(
SharedPreferencesAsync prefs, String key, List< T> value) → Future<void> -
Stores a value of type
T
in SharedPreferences.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
write(
ByteData data, int offset, T value) → void -
Writes an element of type
T
to the given ByteData starting at the specifiedoffset
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited