InlineQueryResultArticle constructor

const InlineQueryResultArticle({
  1. @JsonKey(name: 'id') required String id,
  2. @JsonKey(name: 'title') required String title,
  3. @JsonKey(name: 'input_message_content') @InputMessageContentConverter() required InputMessageContent inputMessageContent,
  4. @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
  5. @JsonKey(name: 'url') String? url,
  6. @JsonKey(name: 'description') String? description,
  7. @JsonKey(name: 'thumbnail_url') String? thumbnailUrl,
  8. @JsonKey(name: 'thumbnail_width') int? thumbnailWidth,
  9. @JsonKey(name: 'thumbnail_height') int? thumbnailHeight,
  10. @JsonKey(name: 'type') @Default(InlineQueryResultType.article) InlineQueryResultType type,
})

This object represents a link to an article or web page.

Implementation

const factory InlineQueryResultArticle({
  /// Unique identifier for this result
  @JsonKey(name: 'id') required String id,

  /// Title of the result
  @JsonKey(name: 'title') required String title,

  /// Content of the message to be sent
  @JsonKey(name: 'input_message_content')
  @InputMessageContentConverter()
  required InputMessageContent inputMessageContent,

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

  /// Optional. URL of the result
  @JsonKey(name: 'url') String? url,

  /// Optional. Short description of the result
  @JsonKey(name: 'description') String? description,

  /// Optional. Url of the thumbnail for the result
  @JsonKey(name: 'thumbnail_url') String? thumbnailUrl,

  /// Optional. Thumbnail width
  @JsonKey(name: 'thumbnail_width') int? thumbnailWidth,

  /// Optional. Thumbnail height
  @JsonKey(name: 'thumbnail_height') int? thumbnailHeight,

  /// Type of the result, always [InlineQueryResultType.article]
  @JsonKey(name: 'type')
  @Default(InlineQueryResultType.article)
  InlineQueryResultType type,
}) = _InlineQueryResultArticle;