decode method

  • @override

T decode (Decoder decoder, int offset, int depth)

override

Implementation

@override
T? decode(Decoder decoder, int offset, int depth) {
  final int data = decoder.decodeUint64(offset);
  validateEncoded(data);
  if (data == kAllocAbsent) {
    return null;
  }
  final int boxInlineSize = element.inlineSize(decoder.wireFormat);
  final int boxOffset = decoder.claimBytes(boxInlineSize, depth);
  T? decoded =
      element.decodeObject(decoder, boxOffset, boxInlineSize, depth + 1);
  return decoded;
}