SharedUser class

Represents information about a user that was shared with the bot using a KeyboardButtonRequestUser button.

Constructors

SharedUser({required int userId, String? firstName, String? lastName, String? username, List<PhotoSize>? photo})
Creates a SharedUser object.
const
SharedUser.fromJson(Map<String, dynamic> json)
Creates a SharedUser object from a JSON map.
factory

Properties

firstName String?
Optional. First name of the user, if the name was requested by the bot.
final
hashCode int
The hash code for this object.
no setterinherited
lastName String?
Optional. Last name of the user, if the name was requested by the bot.
final
photo List<PhotoSize>?
Optional. Available sizes of the chat photo, if the photo was requested by the bot.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId int
Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier unless the user is already known to the bot by some other means.
final
username String?
Optional. Username of the user, if the username was requested by the bot.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this object to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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