toCbor method

  1. @override
CborObject toCbor([
  1. bool indefinite = false
])
override

Converts the object to a CBOR object.

Implementation

@override
CborObject toCbor([bool indefinite = false]) {
  if (indefinite) {
    return CborBytesValue(CborListValue<CborSignedValue>.dynamicLength(
            values.map((e) => CborSignedValue.i64(e)).toList())
        .encode());
  }
  return CborListValue<CborSignedValue>.fixedLength(
      values.map((e) => CborSignedValue.i64(e)).toList());
}