User class

A user of your app. TalkJS uses the id to uniquely identify this user. All other fields of a User are allowed to vary over time and the TalkJS database will update its fields accordingly. @public

Annotations
  • @JS()

Constructors

User(UserOptions options)
Create a TalkJS User
factory

Properties

availabilityText String?
Availability acts similarly to {@link User.welcomeMessage} but appears as a {@link https://talkjs.com/docs/Reference/Concepts/System_Messages.html | system message}.
no setter
custom → dynamic
Allows you to set custom metadata for the User
no setter
email → dynamic
One or more email address belonging to the User. The email addresses will be used for {@link https://talkjs.com/docs/Features/Notifications/Email_Notifications/index.html | Email Notifications} if they are enabled.
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
The unqiue ID which is used to identify the user in TalkJS
no setter
locale String?
The locale field expects an {@link https://www.w3.org/International/articles/language-tags/ | IETF language tag}. See the {@link https://talkjs.com/docs/Features/Multiple_Languages.html | localization documentation}.
no setter
name String
The User's name which will be displayed on the TalkJS UI
no setter
phone → dynamic
One or more phone numbers belonging to the User. The phone number will be used for {@link https://talkjs.com/docs/Features/Notifications/SMS_Notifications.html | SMS Notifications } (this feature requires standard plan and up).
no setter
photoUrl String?
An optional URL to a photo which will be displayed as the user's avatar
no setter
role String?
TalkJS supports multiple sets of settings, called "roles". These allow you to change the behavior of TalkJS for different users. You have full control over which user gets which configuration.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
welcomeMessage String?
The default message a user sees when starting a chat with that person
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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