byteLength property
The number of bytes required to store any
instance of T
(i.e. max size).
Implementation
@override
int get byteLength {
int size = 0;
for (final BorshCodecFixedSized? variant in variants) {
if (variant != null) {
size = max(size, variant.byteLength);
}
}
return ByteLength.u8 + size;
}