copyWith method

ChatUIKitProfile copyWith({
  1. String? showName,
  2. String? avatarUrl,
  3. Map<String, String>? extension,
  4. String? remark,
  5. int? timestamp,
})

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.

Implementation

ChatUIKitProfile copyWith({
  String? showName,
  String? avatarUrl,
  Map<String, String>? extension,
  String? remark,
  int? timestamp,
}) {
  return ChatUIKitProfile(
    id: id,
    showName: showName ?? this.showName,
    avatarUrl: avatarUrl ?? this.avatarUrl,
    type: type,
    extension: extension ?? this.extension,
    timestamp: timestamp ?? this.timestamp,
    remark: remark ?? this.remark,
  );
}