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.
idis the user id.showNameis the show name. when type is contact, it is the user nickname, when type is group, it is the group name.avatarUrlis the user avatar address.typeis the profile type.extensionis the extension field.remarkis the user remark information.timestampis 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.
idis the user id.nicknameis the user name.avatarUrlis the user avatar address.remarkis the user remark information.extensionis the extension field.timestampis 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.
idis the id.showNameis the show name.avatarUrlis the avatar address.remarkis the remark information.extensionis the extension field.timestampis the timestamp. -
ChatUIKitProfile.group({required String id, String? groupName, String? avatarUrl, Map<
String, String> ? extension, int timestamp = 0}) -
Create a group profile object.
idis the group id.groupNameis the group name.avatarUrlis the group avatar address.extensionis the extension field.timestampis 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.
showNameis the show name. when type is contact, it is the user nickname, when type is group, it is the group name.avatarUrlis the user avatar address.extensionis the extension field.remarkis the user remark information.timestampis 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