readWritables<W extends Writable> method
Reads a list of Writable using the reader function to instantiate the W elements.
- If
leb128istruewill use readLeb128UnsignedInt to read the size of the list.
Implementation
List<W> readWritables<W extends Writable>(
W Function(BytesBuffer input) reader,
{bool leb128 = false}) {
int sz;
if (leb128) {
sz = readLeb128UnsignedInt();
} else {
sz = readInt32();
}
var list = List.generate(sz, (i) => reader(this));
return list;
}