User class final

Represents a user

Inheritance

Constructors

User({required int id, required String firstName, required String lastName, Usernames? usernames, required String phoneNumber, required UserStatus status, ProfilePhoto? profilePhoto, required int accentColorId, required int backgroundCustomEmojiId, UpgradedGiftColors? upgradedGiftColors, required int profileAccentColorId, required int profileBackgroundCustomEmojiId, EmojiStatus? emojiStatus, required bool isContact, required bool isMutualContact, required bool isCloseFriend, VerificationStatus? verificationStatus, required bool isPremium, required bool isSupport, RestrictionInfo? restrictionInfo, ActiveStoryState? activeStoryState, required bool restrictsNewChats, required int paidMessageStarCount, required bool haveAccess, required UserType type, required String languageCode, required bool addedToAttachmentMenu, dynamic extra, int? clientId})
Represents a user
const
User.fromJson(Map<String, dynamic> json)
Parses a User from TDLib JSON.
factory

Properties

accentColorId → int
Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview
final
activeStoryState → ActiveStoryState?
State of active stories of the user; may be null if the user has no active stories
final
addedToAttachmentMenu → bool
True, if the user added the current bot to attachment menu; only available to bots
final
backgroundCustomEmojiId → int
Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none
final
clientId → int?
Identifier of the TDLib client that sent this object.
final
emojiStatus → EmojiStatus?
Emoji status to be shown instead of the default Telegram Premium badge; may be null
final
extra → dynamic
"@extra" of the request this object answers.
final
firstName → String
First name of the user
final
hashCode → int
The hash code for this object.
no setterinherited
haveAccess → bool
If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method
final
id → int
User identifier
final
isCloseFriend → bool
The user is a close friend of the current user; implies that the user is a contact
final
isContact → bool
The user is a contact of the current user
final
isMutualContact → bool
The user is a contact of the current user and the current user is a contact of the user
final
isPremium → bool
True, if the user is a Telegram Premium user
final
isSupport → bool
True, if the user is Telegram support account
final
languageCode → String
IETF language tag of the user's language; only available to bots
final
lastName → String
Last name of the user
final
paidMessageStarCount → int
Number of Telegram Stars that must be paid by general user for each sent message to the user. If positive and userFullInfo is unknown, use canSendMessageToUser to check whether the current user must pay
final
phoneNumber → String
Phone number of the user
final
profileAccentColorId → int
Identifier of the accent color for the user's profile; -1 if none
final
profileBackgroundCustomEmojiId → int
Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none
final
profilePhoto → ProfilePhoto?
Profile photo of the user; may be null
final
restrictionInfo → RestrictionInfo?
Information about restrictions that must be applied to the corresponding private chat; may be null if none
final
restrictsNewChats → bool
True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → UserStatus
Current online status of the user
final
type → UserType
Type of the user
final
upgradedGiftColors → UpgradedGiftColors?
Color scheme based on an upgraded gift to be used for the user instead of accent_color_id and background_custom_emoji_id; may be null if none
final
usernames → Usernames?
Usernames of the user; may be null
final
verificationStatus → VerificationStatus?
Information about verification status of the user; may be null if none
final

Methods

copyWith({int? id, String? firstName, String? lastName, Usernames? usernames()?, String? phoneNumber, UserStatus? status, ProfilePhoto? profilePhoto()?, int? accentColorId, int? backgroundCustomEmojiId, UpgradedGiftColors? upgradedGiftColors()?, int? profileAccentColorId, int? profileBackgroundCustomEmojiId, EmojiStatus? emojiStatus()?, bool? isContact, bool? isMutualContact, bool? isCloseFriend, VerificationStatus? verificationStatus()?, bool? isPremium, bool? isSupport, RestrictionInfo? restrictionInfo()?, ActiveStoryState? activeStoryState()?, bool? restrictsNewChats, int? paidMessageStarCount, bool? haveAccess, UserType? type, String? languageCode, bool? addedToAttachmentMenu, dynamic extra, int? clientId}) → User
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.