User class

Inheritance

Constructors

User({required int id, required String firstName, required String lastName, Usernames? usernames, required String phoneNumber, required UserStatus status, ProfilePhoto? profilePhoto, EmojiStatus? emojiStatus, required bool isContact, required bool isMutualContact, required bool isCloseFriend, required bool isVerified, required bool isPremium, required bool isSupport, required String restrictionReason, required bool isScam, required bool isFake, required bool hasActiveStories, required bool hasUnreadActiveStories, 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)
Parse from a json
factory

Properties

addedToAttachmentMenu bool
addedToAttachmentMenu True, if the user added the current bot to attachment menu; only available to bots
final
clientId int?
clientId client identifier
final
emojiStatus EmojiStatus?
emojiStatus Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only
final
extra → dynamic
extra callback sign
final
firstName String
firstName First name of the user
final
hasActiveStories bool
hasActiveStories True, if the user has non-expired stories available to the current user
final
hashCode int
The hash code for this object.
no setterinherited
hasUnreadActiveStories bool
hasUnreadActiveStories True, if the user has unread non-expired stories available to the current user
final
haveAccess bool
haveAccess 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
id User identifier
final
isCloseFriend bool
isCloseFriend The user is a close friend of the current user; implies that the user is a contact
final
isContact bool
isContact The user is a contact of the current user
final
isFake bool
isFake True, if many users reported this user as a fake account
final
isMutualContact bool
isMutualContact The user is a contact of the current user and the current user is a contact of the user
final
isPremium bool
isPremium True, if the user is a Telegram Premium user
final
isScam bool
isScam True, if many users reported this user as a scam
final
isSupport bool
isSupport True, if the user is Telegram support account
final
isVerified bool
isVerified True, if the user is verified
final
languageCode String
languageCode IETF language tag of the user's language; only available to bots
final
lastName String
lastName Last name of the user
final
phoneNumber String
phoneNumber Phone number of the user
final
profilePhoto ProfilePhoto?
profilePhoto Profile photo of the user; may be null
final
restrictionReason String
restrictionReason If non-empty, it contains a human-readable description of the reason why access to this user must be restricted
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status UserStatus
status Current online status of the user
final
type UserType
type Type of the user
final
usernames Usernames?
usernames Usernames of the user; may be null
final

Methods

copyWith({int? id, String? firstName, String? lastName, Usernames? usernames, String? phoneNumber, UserStatus? status, ProfilePhoto? profilePhoto, EmojiStatus? emojiStatus, bool? isContact, bool? isMutualContact, bool? isCloseFriend, bool? isVerified, bool? isPremium, bool? isSupport, String? restrictionReason, bool? isScam, bool? isFake, bool? hasActiveStories, bool? hasUnreadActiveStories, bool? haveAccess, UserType? type, String? languageCode, bool? addedToAttachmentMenu, dynamic extra, int? clientId}) User
getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson([dynamic extra]) Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String