Update class
This object represents an incoming update.
At most one of the optional parameters can be present in any given update.
- Available extensions
Constructors
- Update({required int updateId, Message? message, Message? editedMessage, Message? channelPost, Message? editedChannelPost, InlineQuery? inlineQuery, ChosenInlineResult? chosenInlineResult, CallbackQuery? callbackQuery, ShippingQuery? shippingQuery, PreCheckoutQuery? preCheckoutQuery, Poll? poll, PollAnswer? pollAnswer, ChatMemberUpdated? myChatMember, ChatMemberUpdated? chatMember, ChatJoinRequest? chatJoinRequest, MessageReactionUpdated? messageReaction, MessageReactionCountUpdated? messageReactionCount, ChatBoostUpdated? chatBoost, ChatBoostRemoved? removedChatBoost, BusinessConnection? businessConnection, Message? businessMessage, Message? editedBusinessMessage, BusinessMessagesDeleted? deletedBusinessMessages, PaidMediaPurchased? purchasedPaidMedia})
-
Update Constructor
const
-
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
final
- businessMessage → Message?
-
Optional. New non-service message from a connected business account
final
- callbackQuery → CallbackQuery?
-
Optional. New incoming callback query
final
- channelPost → Message?
-
Optional. New incoming channel post of any kind - text, photo, sticker, etc.
final
- 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.
final
- 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.
final
- 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.
final
- 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.
final
- deletedBusinessMessages → BusinessMessagesDeleted?
-
Optional. Messages were deleted from a connected business account
final
- editedBusinessMessage → Message?
-
Optional. New version of a message from a connected business account
final
- editedChannelPost → Message?
-
Optional. New version of a channel post that is known to the bot and was edited
final
- editedMessage → Message?
-
Optional. New version of a message that is known to the bot and was edited
final
- 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
final
- message → Message?
-
Optional. New incoming message of any kind — text, photo, sticker, etc.
final
- 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.
final
- 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.
final
- 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.
final
- poll → Poll?
-
Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot
final
- 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.
final
- preCheckoutQuery → PreCheckoutQuery?
-
Optional. New incoming pre-checkout query. Contains full information about checkout
final
- purchasedPaidMedia → PaidMediaPurchased?
-
Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat
final
- removedChatBoost → ChatBoostRemoved?
-
Optional. A chat boost was removed. The bot must be an administrator in the chat to receive these updates.
final
- 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
final
- type → UpdateType
-
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.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts a Update to a Map which can be serialized to JSON.
-
toRawJson(
) → String - Converts a Update object to a JSON string.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited