InputMessageContent class sealed

This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:

  • InputTextMessageContent
  • InputLocationMessageContent
  • InputVenueMessageContent
  • InputContactMessageContent
  • InputInvoiceMessageContent
Annotations
  • @Freezed()

Constructors

InputMessageContent.contact({@JsonKey(name: 'phone_number') required String phoneNumber, @JsonKey(name: 'first_name') required String firstName, @JsonKey(name: 'last_name') String? lastName, @JsonKey(name: 'vcard') String? vcard})
Represents the content of a contact message to be sent as the result of an inline query.
const
factory
InputMessageContent.fromJson(Map<String, dynamic> json)
Construct the InputMessageContent from JSON
factory
InputMessageContent.invoice({@JsonKey(name: 'title') required String title, @JsonKey(name: 'description') required String description, @JsonKey(name: 'payload') required String payload, @JsonKey(name: 'provider_token') String? providerToken, @JsonKey(name: 'currency') required String currency, @JsonKey(name: 'prices') required List<LabeledPrice> prices, @JsonKey(name: 'max_tip_amount') int? maxTipAmount, @JsonKey(name: 'suggested_tip_amounts') List<int>? suggestedTipAmounts, @JsonKey(name: 'provider_data') String? providerData, @JsonKey(name: 'photo_url') String? photoUrl, @JsonKey(name: 'photo_size') int? photoSize, @JsonKey(name: 'photo_width') int? photoWidth, @JsonKey(name: 'photo_height') int? photoHeight, @JsonKey(name: 'need_name') bool? needName, @JsonKey(name: 'need_phone_number') bool? needPhoneNumber, @JsonKey(name: 'need_email') bool? needEmail, @JsonKey(name: 'need_shipping_address') bool? needShippingAddress, @JsonKey(name: 'send_phone_number_to_provider') bool? sendPhoneNumberToProvider, @JsonKey(name: 'send_email_to_provider') bool? sendEmailToProvider, @JsonKey(name: 'is_flexible') bool? isFlexible})
Represents the content of an invoice message to be sent as the result of an inline query.
const
factory
InputMessageContent.location({@JsonKey(name: 'latitude') required double latitude, @JsonKey(name: 'longitude') required double longitude, @JsonKey(name: 'live_period') int? livePeriod, @JsonKey(name: 'horizontal_accuracy') int? horizontalAccuracy, @JsonKey(name: 'heading') int? heading, @JsonKey(name: 'proximity_alert_radius') int? proximityAlertRadius})
Represents the content of a location message to be sent as the result of an inline query.
const
factory
InputMessageContent.text({@JsonKey(name: 'message_text') required String messageText, @JsonKey(name: 'parse_mode') ParseMode? parseMode, @JsonKey(name: 'entities') List<MessageEntity>? entities, @JsonKey(name: 'link_preview_options') LinkPreviewOptions? linkPreviewOptions})
Represents the content of a text message to be sent as the result of an inline query.
const
factory
InputMessageContent.venue({@JsonKey(name: 'latitude') required double latitude, @JsonKey(name: 'longitude') required double longitude, @JsonKey(name: 'title') required String title, @JsonKey(name: 'address') required String address, @JsonKey(name: 'foursquare_id') String? foursquareId, @JsonKey(name: 'foursquare_type') String? foursquareType, @JsonKey(name: 'google_place_id') String? googlePlaceId, @JsonKey(name: 'google_place_type') String? googlePlaceType})
Represents the content of a venue message to be sent as the result of an inline query.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this InputMessageContent to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited