UpdateStory.deserialize constructor

UpdateStory.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory UpdateStory.deserialize(BinaryReader reader) {
  // Read [UpdateStory] fields.
  final peer = reader.readObject() as PeerBase;
  final story = reader.readObject() as StoryItemBase;

  // Construct [UpdateStory] object.
  final returnValue = UpdateStory(
    peer: peer,
    story: story,
  );

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