UpdatesDifference.deserialize constructor
UpdatesDifference.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory UpdatesDifference.deserialize(BinaryReader reader) {
// Read [UpdatesDifference] fields.
final newMessages = reader.readVectorObject<MessageBase>();
final newEncryptedMessages =
reader.readVectorObject<EncryptedMessageBase>();
final otherUpdates = reader.readVectorObject<UpdateBase>();
final chats = reader.readVectorObject<ChatBase>();
final users = reader.readVectorObject<UserBase>();
final state = reader.readObject() as UpdatesStateBase;
// Construct [UpdatesDifference] object.
final returnValue = UpdatesDifference(
newMessages: newMessages.items,
newEncryptedMessages: newEncryptedMessages.items,
otherUpdates: otherUpdates.items,
chats: chats.items,
users: users.items,
state: state,
);
// Now return the deserialized [UpdatesDifference].
return returnValue;
}