readString method

String readString(
  1. StringLocation location,
  2. Object? relatedKey
)

Implementation

String readString(StringLocation location, Object? relatedKey) {
  var tag = readTag();
  if (tag == SerializationTag.kOneByteString) {
    return readOneByteString(location, relatedKey);
  } else if (tag == SerializationTag.kTwoByteString) {
    return readTwoByteString(location, relatedKey);
  } else if (tag == SerializationTag.kUtf8String) {
    return readUTF8String(location, relatedKey);
  } else {
    throw UnsupportedError("readString unexpected tag: $tag");
  }
}