cborEncode function

BinaryBlob cborEncode(
  1. dynamic value, {
  2. SelfDescribeEncoder? withSerializer,
})

Implementation

BinaryBlob cborEncode(dynamic value, {SelfDescribeEncoder? withSerializer}) {
  var serializer = withSerializer ?? initCborSerializer();
  serializer.serialize(value);
  return Uint8List.fromList(serializer._out.getData());
}