InputBotInlineResultPhoto.deserialize constructor

InputBotInlineResultPhoto.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory InputBotInlineResultPhoto.deserialize(BinaryReader reader) {
  // Read [InputBotInlineResultPhoto] fields.
  final id = reader.readString();
  final type = reader.readString();
  final photo = reader.readObject() as InputPhotoBase;
  final sendMessage = reader.readObject() as InputBotInlineMessageBase;

  // Construct [InputBotInlineResultPhoto] object.
  final returnValue = InputBotInlineResultPhoto(
    id: id,
    type: type,
    photo: photo,
    sendMessage: sendMessage,
  );

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