User class
A thin, read-only typed wrapper around a raw Telegram User JSON object
— the shape found in Message.from, Update.from, ChatMember.user,
and many other places throughout the API.
Wrapping is optional and lossless: construct one from any User-shaped
Json you already have (User(update.from!)), and raw is always
available underneath for any field not covered by a getter here.
Properties
- addedToAttachmentMenu → bool?
-
Whether this user added the bot to their attachment menu.
no setter
- canConnectToBusiness → bool?
-
(Bot-only, via
getMe) Whether the bot can be connected to a Telegram Business account.no setter - canJoinGroups → bool?
-
(Bot-only, via
getMe) Whether the bot can be invited to groups.no setter - canReadAllGroupMessages → bool?
-
(Bot-only, via
getMe) Whether privacy mode is disabled, so the bot receives every message sent to a group it's in.no setter - firstName → String
-
The user's or bot's first name.
no setter
- fullName → String
-
firstName, plus lastName appended if set — a convenient display name.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasMainWebApp → bool?
-
(Bot-only, via
getMe) Whether the bot has a main Mini App.no setter - id → int
-
Unique identifier for this user or bot.
no setter
- isBot → bool
-
Whether this user represents a bot.
no setter
- isPremium → bool?
-
Whether this user is a Telegram Premium subscriber.
no setter
- languageCode → String?
-
IETF language tag of the user's Telegram client, if known (not
necessarily their actual spoken language).
no setter
- lastName → String?
-
The user's or bot's last name, if set.
no setter
- raw → Json
-
The raw JSON this wrapper reads from.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsInlineQueries → bool?
-
(Bot-only, via
getMe) Whether the bot supports inline queries.no setter - username → String?
-
The user's or bot's
@username, if set.no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited