AccountReportProfilePhoto.deserialize constructor

AccountReportProfilePhoto.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory AccountReportProfilePhoto.deserialize(BinaryReader reader) {
  // Read [AccountReportProfilePhoto] fields.
  final peer = reader.readObject() as InputPeerBase;
  final photoId = reader.readObject() as InputPhotoBase;
  final reason = reader.readObject() as ReportReasonBase;
  final message = reader.readString();

  // Construct [AccountReportProfilePhoto] object.
  final returnValue = AccountReportProfilePhoto(
    peer: peer,
    photoId: photoId,
    reason: reason,
    message: message,
  );

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