toCbor method

  1. @override
CborObject toCbor()
override

Converts the object to a CBOR object.

Implementation

@override
CborObject toCbor() {
  return CborListValue.fixedLength([
    CborIntValue(hash == null ? 0 : 1),
    if (hash != null) CborBytesValue(hash!)
  ]);
}