InputPhotoLegacyFileLocation.deserialize constructor

InputPhotoLegacyFileLocation.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory InputPhotoLegacyFileLocation.deserialize(BinaryReader reader) {
  // Read [InputPhotoLegacyFileLocation] fields.
  final id = reader.readInt64();
  final accessHash = reader.readInt64();
  final fileReference = reader.readBytes();
  final volumeId = reader.readInt64();
  final localId = reader.readInt32();
  final secret = reader.readInt64();

  // Construct [InputPhotoLegacyFileLocation] object.
  final returnValue = InputPhotoLegacyFileLocation(
    id: id,
    accessHash: accessHash,
    fileReference: fileReference,
    volumeId: volumeId,
    localId: localId,
    secret: secret,
  );

  // Now return the deserialized [InputPhotoLegacyFileLocation].
  return returnValue;
}