ContactsFound.deserialize constructor

ContactsFound.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory ContactsFound.deserialize(BinaryReader reader) {
  // Read [ContactsFound] fields.
  final myResults = reader.readVectorObject<PeerBase>();
  final results = reader.readVectorObject<PeerBase>();
  final chats = reader.readVectorObject<ChatBase>();
  final users = reader.readVectorObject<UserBase>();

  // Construct [ContactsFound] object.
  final returnValue = ContactsFound(
    myResults: myResults.items,
    results: results.items,
    chats: chats.items,
    users: users.items,
  );

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