toBytes method
Implementation
@override
Uint8List toBytes() {
ByteDataWriter mem = ByteDataWriter(endian: Endian.little);
mem.writeUint8(tag);
if (moduleBytes == null || moduleBytes!.isEmpty) {
mem.writeInt32(0);
} else {
mem.writeInt32(moduleBytes!.length);
mem.write(moduleBytes!);
}
Uint8List argsBytes = super.toBytes();
mem.write(argsBytes);
return mem.toBytes();
}