writeOpaque method
Variable-length opaque — length(uint32 BE) + bytes + 0..3 bytes of zero padding to align to 4-byte boundary.
Implementation
void writeOpaque(List<int> bytes) {
writeUint32(bytes.length);
_b.add(bytes);
final pad = (4 - bytes.length % 4) % 4;
if (pad > 0) _b.add(List<int>.filled(pad, 0));
}