EncryptedChat.deserialize constructor

EncryptedChat.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory EncryptedChat.deserialize(BinaryReader reader) {
  // Read [EncryptedChat] fields.
  final id = reader.readInt32();
  final accessHash = reader.readInt64();
  final date = reader.readDateTime();
  final adminId = reader.readInt64();
  final participantId = reader.readInt64();
  final gAOrB = reader.readBytes();
  final keyFingerprint = reader.readInt64();

  // Construct [EncryptedChat] object.
  final returnValue = EncryptedChat(
    id: id,
    accessHash: accessHash,
    date: date,
    adminId: adminId,
    participantId: participantId,
    gAOrB: gAOrB,
    keyFingerprint: keyFingerprint,
  );

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