User class



User({int id, String firstName, String lastName, String username, String phoneNumber, UserStatus status, ProfilePhoto profilePhoto, bool isContact, bool isMutualContact, bool isVerified, bool isSupport, String restrictionReason, bool isScam, bool haveAccess, UserType type, String languageCode})
Represents a user
User.fromJson(Map<String, dynamic> json)
Parse from a json


extra ↔ dynamic
callback sign
read / write
firstName String
firstName First name of the user
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
haveAccess bool
haveAccess If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser
read / write
id int
id User identifier
read / write
isContact bool
isContact The user is a contact of the current user
read / write
isMutualContact bool
isMutualContact The user is a contact of the current user and the current user is a contact of the user
read / write
isScam bool
isScam True, if many users reported this user as a scam
read / write
isSupport bool
isSupport True, if the user is Telegram support account
read / write
isVerified bool
isVerified True, if the user is verified
read / write
languageCode String
languageCode IETF language tag of the user's language; only available to bots
read / write
lastName String
lastName Last name of the user
read / write
phoneNumber String
phoneNumber Phone number of the user
read / write
profilePhoto ProfilePhoto
profilePhoto Profile photo of the user; may be null
read / write
restrictionReason String
restrictionReason If non-empty, it contains a human-readable description of the reason why access to this user must be restricted
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
status UserStatus
status Current online status of the user
read / write
type UserType
type Type of the user
read / write
username String
username Username of the user
read / write


getConstructor() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toJson() Map<String, dynamic>
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]


CONSTRUCTOR → const String