InlineQueryResultContact constructor

const InlineQueryResultContact({
  1. @JsonKey(name: 'id') required String id,
  2. @JsonKey(name: 'type') @Default(InlineQueryResultType.contact) InlineQueryResultType type,
  3. @JsonKey(name: 'phone_number') required String phoneNumber,
  4. @JsonKey(name: 'first_name') required String firstName,
  5. @JsonKey(name: 'last_name') String? lastName,
  6. @JsonKey(name: 'vcard') String? vcard,
  7. @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
  8. @JsonKey(name: 'input_message_content') @InputMessageContentConverter() InputMessageContent? inputMessageContent,
  9. @JsonKey(name: 'thumbnail_url') String? thumbnailUrl,
  10. @JsonKey(name: 'thumbnail_width') int? thumbnailWidth,
  11. @JsonKey(name: 'thumbnail_height') int? thumbnailHeight,
})

Constructs an InlineQueryResultContact object

Implementation

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

  /// Type of the result, always [InlineQueryResultType.contact]
  @JsonKey(name: 'type')
  @Default(InlineQueryResultType.contact)
  InlineQueryResultType type,

  /// Contact's phone number
  @JsonKey(name: 'phone_number') required String phoneNumber,

  /// Contact's first name
  @JsonKey(name: 'first_name') required String firstName,

  /// Optional. Contact's last name
  @JsonKey(name: 'last_name') String? lastName,

  /// Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
  @JsonKey(name: 'vcard') String? vcard,

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

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

  /// 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,
}) = _InlineQueryResultContact;