InlineQueryResultGif constructor

const InlineQueryResultGif({
  1. @JsonKey(name: 'type') @Default(InlineQueryResultType.gif) InlineQueryResultType type,
  2. @JsonKey(name: 'id') required String id,
  3. @JsonKey(name: 'gif_url') required String gifUrl,
  4. @JsonKey(name: 'thumbnail_url') required String thumbnailUrl,
  5. @JsonKey(name: 'gif_width') int? gifWidth,
  6. @JsonKey(name: 'gif_height') int? gifHeight,
  7. @JsonKey(name: 'gif_duration') int? gifDuration,
  8. @JsonKey(name: 'thumbnail_mime_type') String? thumbnailMimeType,
  9. @JsonKey(name: 'title') String? title,
  10. @JsonKey(name: 'caption') String? caption,
  11. @JsonKey(name: 'parse_mode') ParseMode? parseMode,
  12. @JsonKey(name: 'caption_entities') List<MessageEntity>? captionEntities,
  13. @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
  14. @JsonKey(name: 'input_message_content') @InputMessageContentConverter() InputMessageContent? inputMessageContent,
  15. @JsonKey(name: 'show_caption_above_media') bool? showCaptionAboveMedia,
})

Creates an InlineQueryResultGif object

Implementation

const factory InlineQueryResultGif({
  /// Type of the result, always [InlineQueryResultType.gif]
  @JsonKey(name: 'type')
  @Default(InlineQueryResultType.gif)
  InlineQueryResultType type,

  /// Unique identifier for this result, 1-64 Bytes
  @JsonKey(name: 'id') required String id,

  /// A valid URL for the GIF file. File size must not exceed 1MB
  @JsonKey(name: 'gif_url') required String gifUrl,

  /// URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
  @JsonKey(name: 'thumbnail_url') required String thumbnailUrl,

  /// Optional. Width of the GIF
  @JsonKey(name: 'gif_width') int? gifWidth,

  /// Optional. Height of the GIF
  @JsonKey(name: 'gif_height') int? gifHeight,

  /// Optional. Duration of the GIF in seconds
  @JsonKey(name: 'gif_duration') int? gifDuration,

  /// Optional. MIME type of the thumbnail, must be one of "image/jpeg", "image/gif", or "video/mp4". Defaults to "image/jpeg"
  @JsonKey(name: 'thumbnail_mime_type') String? thumbnailMimeType,

  /// Optional. Title for the result
  @JsonKey(name: 'title') String? title,

  /// Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
  @JsonKey(name: 'caption') String? caption,

  /// Optional. Mode for parsing entities in the caption. See formatting options for more details.
  @JsonKey(name: 'parse_mode') ParseMode? parseMode,

  /// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
  @JsonKey(name: 'caption_entities') List<MessageEntity>? captionEntities,

  /// Optional. Inline keyboard attached to the message
  @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,

  /// Optional. Content of the message to be sent instead of the GIF animation
  @JsonKey(name: 'input_message_content')
  @InputMessageContentConverter()
  InputMessageContent? inputMessageContent,

  /// Optional. True, if the caption must be shown above the message media
  @JsonKey(name: 'show_caption_above_media') bool? showCaptionAboveMedia,
}) = _InlineQueryResultGif;