ChatUIKitProfile class

ChatUIKitProfile class, used to store information about contacts or groups.

Constructors

ChatUIKitProfile({required String id, required ChatUIKitProfileType type, String? showName, String? avatarUrl, Map<String, String>? extension, String? remark, int timestamp = 0})
Constructor, used to create a profile object. id is the user id. showName is the show name. when type is contact, it is the user nickname, when type is group, it is the group name. avatarUrl is the user avatar address. type is the profile type. extension is the extension field. remark is the user remark information. timestamp is the timestamp.
ChatUIKitProfile.contact({required String id, String? nickname, String? avatarUrl, String? remark, Map<String, String>? extension, int timestamp = 0})
Create a contact profile object. id is the user id. nickname is the user name. avatarUrl is the user avatar address. remark is the user remark information. extension is the extension field. timestamp is the timestamp.
ChatUIKitProfile.custom({required String id, String? showName, String? avatarUrl, String? remark, Map<String, String>? extension, int timestamp = 0})
Create a custom profile object. id is the id. showName is the show name. avatarUrl is the avatar address. remark is the remark information. extension is the extension field. timestamp is the timestamp.
ChatUIKitProfile.group({required String id, String? groupName, String? avatarUrl, Map<String, String>? extension, int timestamp = 0})
Create a group profile object. id is the group id. groupName is the group name. avatarUrl is the group avatar address. extension is the extension field. timestamp is the timestamp.

Properties

avatarUrl String?
头像地址, 如果是联系人,则为用户头像地址,如果是群组,则为群组头像地址。
final
contactShowName String
The name used for display, if the name is empty, the id is displayed.
no setter
extension Map<String, String>?
Extension field, used to store some additional information.
final
hashCode int
The hash code for this object.
no setterinherited
id String
id, if it is a contact, it is the user id, if it is a group, it is the group id.
final
nickname String
The nickname used for display, if the name is empty, the id is displayed.
no setter
remark String?
Remark, if it is a contact, it is the remark information.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showName String?
名称,如果是联系人,则为用户名称,如果是群组,则为群组名称。
final
timestamp int
Timestamp, not used internally by uikit. Developers can use this field to store some timestamp information.
final
type ChatUIKitProfileType
Profile type, used to distinguish between contacts and groups.
final

Methods

copyWith({String? showName, String? avatarUrl, Map<String, String>? extension, String? remark, int? timestamp}) ChatUIKitProfile
Copy the current object and modify the specified attributes. showName is the show name. when type is contact, it is the user nickname, when type is group, it is the group name. avatarUrl is the user avatar address. extension is the extension field. remark is the user remark information. timestamp is the timestamp.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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