InputMessageContent.widget constructor
const
InputMessageContent.widget({
- @JsonKey.new(name: 'html') required String html,
- @JsonKey.new(name: 'width') int? width,
- @JsonKey.new(name: 'height') int? height,
- @JsonKey.new(name: 'public_data') String? publicData,
- @JsonKey.new(name: 'chat_data') String? chatData,
- @JsonKey.new(name: 'caption') String? caption,
- @JsonKey.new(name: 'parse_mode') ParseMode? parseMode,
- @JsonKey.new(name: 'caption_entities') List<
MessageEntity> ? captionEntities, - @JsonKey.new(name: 'show_caption_above_media') bool? showCaptionAboveMedia,
- @JsonKey.new(name: 'allow_queries') bool? allowQueries,
An HTML widget to send as the result of an inline query.
Inline widget results are currently available only in the Telegram test environment.
Implementation
const factory InputMessageContent.widget({
/// HTML source of the widget, 1-32768 bytes before compression and
/// at most 4096 bytes compressed with zlib at maximum compression.
@JsonKey(name: 'html') required final String html,
/// Width of the widget in logical pixels. Omit to fill the message bubble.
@JsonKey(name: 'width') final int? width,
/// Height of the widget in logical pixels. Omit for a variable height.
@JsonKey(name: 'height') final int? height,
/// Data available wherever the widget is shown, up to 1024 bytes.
@JsonKey(name: 'public_data') final String? publicData,
/// Data specific to the message, up to 1024 bytes.
@JsonKey(name: 'chat_data') final String? chatData,
/// Widget caption, up to 1024 characters after parsing entities.
@JsonKey(name: 'caption') final String? caption,
/// Mode for parsing entities in the caption.
@JsonKey(name: 'parse_mode') final ParseMode? parseMode,
/// Caption entities to use instead of a parse mode.
@JsonKey(name: 'caption_entities')
final List<MessageEntity>? captionEntities,
/// Whether to show the caption above the widget.
@JsonKey(name: 'show_caption_above_media')
final bool? showCaptionAboveMedia,
/// Whether the widget can send queries to the bot.
@JsonKey(name: 'allow_queries') final bool? allowQueries,
/// Whether sending the result creates a separate shared widget each time.
@JsonKey(name: 'is_shared') final bool? isShared,
}) = InputWidgetMessageContent;