RecentStory.deserialize constructor
RecentStory.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory RecentStory.deserialize(BinaryReader reader) {
// Read [RecentStory] fields.
final flags = reader.readInt32();
final live = (flags & 1) != 0;
final hasMaxIdField = (flags & 2) != 0;
final maxId = hasMaxIdField ? reader.readInt32() : null;
// Construct [RecentStory] object.
final returnValue = RecentStory(live: live, maxId: maxId);
// Now return the deserialized [RecentStory].
return returnValue;
}