Update class abstract
This object represents an incoming update.
At most one of the optional parameters can be present in any given update.
- Available extensions
- Annotations
-
- @freezed
Constructors
- Update.new({@JsonKey(name: 'update_id') required int updateId, @JsonKey(name: 'message') Message? message, @JsonKey(name: 'edited_message') Message? editedMessage, @JsonKey(name: 'channel_post') Message? channelPost, @JsonKey(name: 'edited_channel_post') Message? editedChannelPost, @JsonKey(name: 'inline_query') InlineQuery? inlineQuery, @JsonKey(name: 'chosen_inline_result') ChosenInlineResult? chosenInlineResult, @JsonKey(name: 'callback_query') CallbackQuery? callbackQuery, @JsonKey(name: 'shipping_query') ShippingQuery? shippingQuery, @JsonKey(name: 'pre_checkout_query') PreCheckoutQuery? preCheckoutQuery, @JsonKey(name: 'poll') Poll? poll, @JsonKey(name: 'poll_answer') PollAnswer? pollAnswer, @JsonKey(name: 'my_chat_member') ChatMemberUpdated? myChatMember, @JsonKey(name: 'chat_member') ChatMemberUpdated? chatMember, @JsonKey(name: 'chat_join_request') ChatJoinRequest? chatJoinRequest, @JsonKey(name: 'message_reaction') MessageReactionUpdated? messageReaction, @JsonKey(name: 'message_reaction_count') MessageReactionCountUpdated? messageReactionCount, @JsonKey(name: 'chat_boost') ChatBoostUpdated? chatBoost, @JsonKey(name: 'removed_chat_boost') ChatBoostRemoved? removedChatBoost, @JsonKey(name: 'business_connection') BusinessConnection? businessConnection, @JsonKey(name: 'business_message') Message? businessMessage, @JsonKey(name: 'edited_business_message') Message? editedBusinessMessage, @JsonKey(name: 'deleted_business_messages') BusinessMessagesDeleted? deletedBusinessMessages, @JsonKey(name: 'purchased_paid_media') PaidMediaPurchased? purchasedPaidMedia})
-
Update Constructor
constfactory
-
Update.fromJson(Map<
String, dynamic> json) -
Creates a Update from json Map.
factory
Properties
- businessConnection → BusinessConnection?
-
Optional. The bot was connected to or disconnected from a business
account, or a user edited an existing connection with the bot
no setterinherited
- businessMessage → Message?
-
Optional. New non-service message from a connected business account
no setterinherited
- callbackQuery → CallbackQuery?
-
Optional. New incoming callback query
no setterinherited
- channelPost → Message?
-
Optional. New incoming channel post of any kind - text, photo, sticker,
etc.
no setterinherited
- chat → Chat?
-
Available on Update, provided by the FromAndChatExt extension
A shorthand getter for the Chat instance from the update.no setter - chatBoost → ChatBoostUpdated?
-
Optional. A chat boost was added or changed. The bot must be an
administrator in the chat to receive these updates.
no setterinherited
- chatJoinRequest → ChatJoinRequest?
-
Optional. A request to join the chat has been sent. The bot must have
the can_invite_users administrator right in the chat to receive these
updates.
no setterinherited
- chatMember → ChatMemberUpdated?
-
Optional. A chat member's status was updated in a chat. The bot must be
an administrator in the chat and must explicitly specify "chat_member"
in the list of allowed_updates to receive these updates.
no setterinherited
- chosenInlineResult → ChosenInlineResult?
-
Optional. The result of an inline query that was chosen by a user and
sent to their chat partner. Please see our documentation on the feedback
collecting for details on how to enable these updates for your bot.
no setterinherited
-
copyWith
→ $UpdateCopyWith<
Update> -
Create a copy of Update
with the given fields replaced by the non-null parameter values.
no setterinherited
- deletedBusinessMessages → BusinessMessagesDeleted?
-
Optional. Messages were deleted from a connected business account
no setterinherited
- editedBusinessMessage → Message?
-
Optional. New version of a message from a connected business account
no setterinherited
- editedChannelPost → Message?
-
Optional. New version of a channel post that is known to the bot and was
edited
no setterinherited
- editedMessage → Message?
-
Optional. New version of a message that is known to the bot and was
edited
no setterinherited
- from → User?
-
Available on Update, provided by the FromAndChatExt extension
A shorthand getter for the User instance from the update.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- inlineQuery → InlineQuery?
-
Optional. New incoming inline query
no setterinherited
- message → Message?
-
Optional. New incoming message of any kind — text, photo, sticker, etc.
no setterinherited
- messageReaction → MessageReactionUpdated?
-
Optional. A reaction to a message was changed by a user. The bot must be
an administrator in the chat and must explicitly specify
"message_reaction" in the list of allowed_updates to receive these
updates. The update isn't received for reactions set by bots.
no setterinherited
- messageReactionCount → MessageReactionCountUpdated?
-
Optional. Reactions to a message with anonymous reactions were changed.
The bot must be an administrator in the chat and must explicitly specify
"message_reaction_count" in the list of allowed_updates to receive these
updates.
no setterinherited
- msg → Message?
-
Available on Update, provided by the FromAndChatExt extension
This is a shorthand getter for the Message recieved in the current contextno setter - myChatMember → ChatMemberUpdated?
-
Optional. New incoming my_chat_member update.
no setterinherited
- poll → Poll?
-
Optional. New poll state. Bots receive only updates about stopped polls
and polls, which are sent by the bot
no setterinherited
- pollAnswer → PollAnswer?
-
Optional. A user changed their answer in a non-anonymous poll. Bots
receive new votes only in polls that were sent by the bot itself.
no setterinherited
- preCheckoutQuery → PreCheckoutQuery?
-
Optional. New incoming pre-checkout query. Contains full information
about checkout
no setterinherited
- purchasedPaidMedia → PaidMediaPurchased?
-
Optional. A user purchased paid media with a non-empty payload sent by
the bot in a non-channel chat
no setterinherited
- removedChatBoost → ChatBoostRemoved?
-
Optional. A chat boost was removed. The bot must be an administrator in
the chat to receive these updates.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shippingQuery → ShippingQuery?
-
Optional. New incoming shipping query. Only for invoices with flexible
price
no setterinherited
- type → UpdateType
-
Available on Update, provided by the UpdateExt extension
Returns the type of the update.no setter - updateId → int
-
The update's unique identifier. Update identifiers start from a certain
positive number and increase sequentially. This ID becomes especially
handy if you're using webhooks, since it allows you to ignore repeated
updates or to restore the correct update sequence, should they get out
of order. If there are no new updates for at least a week, then
identifier of the next update will be chosen randomly instead of
sequentially.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Update to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited