readValue method

Object? readValue({
  1. int tag = SerializationTag.kUnknownTag,
  2. StringLocation location = StringLocation.topLevel,
  3. Object? relatedKey,
})

Implementation

Object? readValue(
    {int tag = SerializationTag.kUnknownTag,
    StringLocation location = StringLocation.topLevel,
    Object? relatedKey}) {
  if (tag == SerializationTag.kUnknownTag) {
    tag = readTag();
  }
  var fun = _valueReaderMap[tag];
  if (fun == null) {
    if (kDebugMode) {
      print("readValue expected tag $tag");
    }
    if (_version < 13) {
      reader.position = -1;
      return readHostObject();
    }
    return undefined;
  } else {
    return fun(location, relatedKey);
  }
}