NumListAdapter class

A NumListAdapter is a specialized BinaryListAdapter for handling lists of numeric values, encoding them as Base64 strings for storage.

This adapter uses a fixed byte size of 8 for each numeric element, allowing it to store both integer and floating-point numbers. It reads and writes numbers using big-endian byte order.

Inheritance

Constructors

NumListAdapter.new()
Creates a new NumListAdapter with a fixed byte size of 8.
const

Properties

byteSize int
The size in bytes of each element in the list.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(String? base64String) List<num>?
Decodes a Base64-encoded String into a list of elements of type T.
inherited
encode(List<num> values) String
Encodes a list of elements of type T into a Base64-encoded String.
inherited
getter(SharedPreferencesAsync prefs, String key) Future<List<num>?>
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) num
Reads a numeric value from the given ByteData starting at the specified offset.
override
setter(SharedPreferencesAsync prefs, String key, List<num> 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, num value) → void
Writes a numeric value to the given ByteData starting at the specified offset.
override

Operators

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