write method

  1. @override
void write(
  1. Encoder encoder
)
override

Implementation

@override
void write(cbor.Encoder encoder) {
  if (_kIsWeb) {
    final data = serializeValue(0, 27, _value.toRadixString(16));
    final buf = Uint8Buffer();
    buf.addAll(data.asUint8List());
    encoder.addBuilderOutput(buf);
  } else {
    encoder.writeInt(_value.toInt());
  }
}