WidgetQueryType.data constructor

  1. @Assert.new('type == WidgetQueryTypeType.data', 'type must be WidgetQueryTypeType.data')
const WidgetQueryType.data({
  1. @JsonKey.new(name: 'type') @Default.new(WidgetQueryTypeType.data) WidgetQueryTypeType type,
  2. @JsonKey.new(name: 'wallet_card') TonWalletCard? walletCard,
})

The query contains data for the bot.

Implementation

@Assert(
  'type == WidgetQueryTypeType.data',
  'type must be WidgetQueryTypeType.data',
)
const factory WidgetQueryType.data({
  /// Type of the query, always "data"
  @JsonKey(name: 'type')
  @Default(WidgetQueryTypeType.data)
  WidgetQueryTypeType type,

  /// Optional. TON wallet card of the user that sent the query, if it was
  /// sent together with the query
  @JsonKey(name: 'wallet_card') TonWalletCard? walletCard,
}) = WidgetQueryTypeData;