StickersSetStickerSetThumb.deserialize constructor

StickersSetStickerSetThumb.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory StickersSetStickerSetThumb.deserialize(BinaryReader reader) {
  // Read [StickersSetStickerSetThumb] fields.
  final flags = reader.readInt32();
  final stickerset = reader.readObject() as InputStickerSetBase;
  final hasThumbField = (flags & 1) != 0;
  final thumb =
      hasThumbField ? reader.readObject() as InputDocumentBase : null;
  final hasThumbDocumentIdField = (flags & 2) != 0;
  final thumbDocumentId = hasThumbDocumentIdField ? reader.readInt64() : null;

  // Construct [StickersSetStickerSetThumb] object.
  final returnValue = StickersSetStickerSetThumb(
    stickerset: stickerset,
    thumb: thumb,
    thumbDocumentId: thumbDocumentId,
  );

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