WidgetQuery constructor
const
WidgetQuery({
- @JsonKey.new(name: 'id') required String id,
- @JsonKey.new(name: 'from') required User from,
- @JsonKey.new(name: 'chat_instance') required String chatInstance,
- @JsonKey.new(name: 'type') required WidgetQueryType type,
- @JsonKey.new(name: 'data') required String data,
- @JsonKey.new(name: 'chat') Chat? chat,
- @JsonKey.new(name: 'message_id') int? messageId,
- @JsonKey.new(name: 'inline_message_id') String? inlineMessageId,
- @JsonKey.new(name: 'chat_type') ChatType? chatType,
- @JsonKey.new(name: 'widget_id') String? widgetId,
Creates a WidgetQuery.
Implementation
const factory WidgetQuery({
/// Unique identifier of the query.
@JsonKey(name: 'id') required String id,
/// User who sent the query.
@JsonKey(name: 'from') required User from,
/// Global identifier for the chat where the message was sent.
@JsonKey(name: 'chat_instance') required String chatInstance,
/// Type of the query and its associated wallet data, if any.
@JsonKey(name: 'type') required WidgetQueryType type,
/// Data sent by the widget, 1-64 bytes.
@JsonKey(name: 'data') required String data,
/// Chat containing the widget message, if the message is not inline.
@JsonKey(name: 'chat') Chat? chat,
/// Identifier of the widget message, if the message is not inline.
@JsonKey(name: 'message_id') int? messageId,
/// Identifier of the inline message containing the widget.
@JsonKey(name: 'inline_message_id') String? inlineMessageId,
/// Type of the chat, for widgets in inline messages.
@JsonKey(name: 'chat_type') ChatType? chatType,
/// Identifier of the widget, if it is shared.
@JsonKey(name: 'widget_id') String? widgetId,
}) = _WidgetQuery;