decodeNullableListBytes<T> static method
Decodes a list of nullable items from framed bytes.
Implementation
static List<T?> decodeNullableListBytes<T>(
Uint8List framed,
T Function(RecordReader r) readItem,
) {
final r = RecordReader.fromFramedBytes(framed);
final count = r.readInt32();
return List.generate(count, (_) {
final hasValue = r.readBool();
return hasValue ? readItem(r) : null;
});
}