InputPhotoFileLocation.deserialize constructor

InputPhotoFileLocation.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory InputPhotoFileLocation.deserialize(BinaryReader reader) {
  // Read [InputPhotoFileLocation] fields.
  final id = reader.readInt64();
  final accessHash = reader.readInt64();
  final fileReference = reader.readBytes();
  final thumbSize = reader.readString();

  // Construct [InputPhotoFileLocation] object.
  final returnValue = InputPhotoFileLocation(
    id: id,
    accessHash: accessHash,
    fileReference: fileReference,
    thumbSize: thumbSize,
  );

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