AccountGetNotifyExceptions.deserialize constructor

AccountGetNotifyExceptions.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory AccountGetNotifyExceptions.deserialize(BinaryReader reader) {
  // Read [AccountGetNotifyExceptions] fields.
  final flags = reader.readInt32();
  final compareSound = (flags & 2) != 0;
  final compareStories = (flags & 4) != 0;
  final hasPeerField = (flags & 1) != 0;
  final peer =
      hasPeerField ? reader.readObject() as InputNotifyPeerBase : null;

  // Construct [AccountGetNotifyExceptions] object.
  final returnValue = AccountGetNotifyExceptions(
    compareSound: compareSound,
    compareStories: compareStories,
    peer: peer,
  );

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