writeVec method
Write a vector into a buffer by first writing the vector length and then calling a callback on each passed value.
Implementation
BcsWriter writeVec(
dynamic vector,
dynamic Function(BcsWriter writer, dynamic el, int i, int len) cb
) {
writeULEB(vector.length);
List.from(vector).asMap().forEach((i, el) => cb(this, el, i, vector.length));
return this;
}