readList method
Read a list with length.
If length is not provided, it is read first.
Implementation
@override
List readList([int? length]) {
length ??= readUint32();
final list = List<dynamic>.filled(length, null, growable: true);
for (var i = 0; i < length; i++) {
list[i] = read();
}
return list;
}