User class
Constructors
- User({required int id, required String firstName, required String lastName, required String username, required String phoneNumber, required UserStatus status, ProfilePhoto? profilePhoto, required bool isContact, required bool isMutualContact, required bool isVerified, required bool isSupport, required String restrictionReason, required bool isScam, required bool isFake, required bool haveAccess, required UserType type, required String languageCode, dynamic extra, int? clientId})
-
Represents a user
const
-
User.fromJson(Map<
String, dynamic> json) -
Parse from a json
factory
Properties
- clientId → int?
-
clientId client identifier
final
- extra → dynamic
-
extra callback sign
final
- firstName → String
-
firstName First name of the user
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
final
- id → int
-
id User identifier
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
- 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
- username → String
-
username Username of the user
final
Methods
-
copyWith(
{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? isFake, bool? haveAccess, UserType? type, String? languageCode, 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