encode method

  1. @override
List<int> encode()
override

Encode the value into CBOR bytes

Implementation

@override
List<int> encode() {
  if (value is int || (value as BigInt).isValidInt) {
    return CborIntValue(toInt()).encode();
  }
  return CborSafeIntValue(value).encode();
}