User class
Represents a user
Constructors
- User({String? extra, int? client_id, int53? id, string? first_name, string? last_name, Usernames? usernames, string? phone_number, UserStatus? status, ProfilePhoto? profile_photo, EmojiStatus? emoji_status, Bool? is_contact, Bool? is_mutual_contact, Bool? is_verified, Bool? is_support, string? restriction_reason, Bool? is_scam, Bool? is_fake, Bool? have_access, UserType? type, string? language_code, })
-
User.fromMap(Map<
String, dynamic> map)
Properties
-
True, if the user added the current bot to attachment menu; only available to bots
getter/setter pair
- client_id ↔ int?
-
TDLib client id; maps to the field @client_id.
getter/setter pairinherited
- emoji_status ↔ EmojiStatus?
-
Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only
getter/setter pair
- extra ↔ String?
-
Matches requests with responses; maps to the field @extra.
getter/setter pairinherited
- first_name ↔ string?
-
First name of the user
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- have_access ↔ 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
getter/setter pair
- id ↔ int53?
-
User identifier
getter/setter pair
- is_contact ↔ Bool?
-
The user is a contact of the current user
getter/setter pair
- is_fake ↔ Bool?
-
True, if many users reported this user as a fake account
getter/setter pair
- is_mutual_contact ↔ Bool?
-
The user is a contact of the current user and the current user is a contact of the user
getter/setter pair
-
True, if the user is a Telegram Premium user
getter/setter pair
- is_scam ↔ Bool?
-
True, if many users reported this user as a scam
getter/setter pair
- is_support ↔ Bool?
-
True, if the user is Telegram support account
getter/setter pair
- is_verified ↔ Bool?
-
True, if the user is verified
getter/setter pair
- language_code ↔ string?
-
IETF language tag of the user's language; only available to bots
getter/setter pair
- last_name ↔ string?
-
Last name of the user
getter/setter pair
- phone_number ↔ string?
-
Phone number of the user
getter/setter pair
- profile_photo ↔ ProfilePhoto?
-
Profile photo of the user; may be null
getter/setter pair
- restriction_reason ↔ string?
-
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status ↔ UserStatus?
-
Current online status of the user
getter/setter pair
- tdType → String
-
JSON object type; maps to the field @type.
no setteroverride
- type ↔ UserType?
-
Type of the user
getter/setter pair
- usernames ↔ Usernames?
-
Usernames of the user; may be null
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
{dynamic skipNulls = true}) → String -
Serialize a Td instance to a JSON string.
If
skipNullsistruethe fields with null values are not serialized.inherited -
toMap(
{dynamic skipNulls = true}) → Map< String, dynamic> -
Create a Map from a Td instance.
override
-
toString(
{dynamic skipNulls = false}) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited