WidgetQuery class abstract

A query from a widget in a message sent by the bot or via the bot.

Implemented types
Available extensions
Annotations
  • @freezed

Constructors

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.
const
factory
WidgetQuery.fromJson(Map<String, dynamic> json)
Creates a WidgetQuery from JSON.
factory

Properties

chat → Chat?
Chat containing the widget message, if the message is not inline.
no setterinherited
chatInstance → String
Global identifier for the chat where the message was sent.
no setterinherited
chatType → ChatType?
Type of the chat, for widgets in inline messages.
no setterinherited
copyWith → $WidgetQueryCopyWith<WidgetQuery>
Create a copy of WidgetQuery with the given fields replaced by the non-null parameter values.
no setterinherited
data → String
Data sent by the widget, 1-64 bytes.
no setterinherited
from → User
User who sent the query.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier of the query.
no setterinherited
inlineMessageId → String?
Identifier of the inline message containing the widget.
no setterinherited
messageId → int?
Identifier of the widget message, if the message is not inline.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → WidgetQueryType
Type of the query and its associated wallet data, if any.
no setterinherited
widgetId → String?
Identifier of the widget, if it is shared.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_WidgetQuery value)) → TResult

Available on WidgetQuery, provided by the WidgetQueryPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_WidgetQuery value)?) → TResult?

Available on WidgetQuery, provided by the WidgetQueryPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_WidgetQuery value)?, {required TResult orElse()}) → TResult

Available on WidgetQuery, provided by the WidgetQueryPatterns extension

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

Operators

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