copyWith method

ConversationItemEntity copyWith({
  1. String? conversationID,
  2. int? unreadCount,
  3. String? type,
  4. ConversationItemLastMessage? lastMessage,
  5. int? peerReadTime,
  6. List? groupAtInfoList,
  7. String? remark,
  8. bool? isPinned,
  9. String? messageRemindType,
  10. List? markList,
  11. String? customData,
  12. List? conversationGroupList,
  13. String? draftText,
  14. ConversationItemUserProfile? userProfile,
  15. ConversationItemGroupProfile? groupProfile,
  16. String? subType,
  17. bool? isinfocompleted,
})

Implementation

ConversationItemEntity copyWith({
  String? conversationID,
  int? unreadCount,
  String? type,
  ConversationItemLastMessage? lastMessage,
  int? peerReadTime,
  List<dynamic>? groupAtInfoList,
  String? remark,
  bool? isPinned,
  String? messageRemindType,
  List<dynamic>? markList,
  String? customData,
  List<dynamic>? conversationGroupList,
  String? draftText,
  ConversationItemUserProfile? userProfile,
  ConversationItemGroupProfile? groupProfile,
  String? subType,
  bool? isinfocompleted,
}) {
  return ConversationItemEntity()
    ..conversationID = conversationID ?? this.conversationID
    ..unreadCount = unreadCount ?? this.unreadCount
    ..type = type ?? this.type
    ..lastMessage = lastMessage ?? this.lastMessage
    ..peerReadTime = peerReadTime ?? this.peerReadTime
    ..groupAtInfoList = groupAtInfoList ?? this.groupAtInfoList
    ..remark = remark ?? this.remark
    ..isPinned = isPinned ?? this.isPinned
    ..messageRemindType = messageRemindType ?? this.messageRemindType
    ..markList = markList ?? this.markList
    ..customData = customData ?? this.customData
    ..conversationGroupList = conversationGroupList ??
        this.conversationGroupList
    ..draftText = draftText ?? this.draftText
    ..userProfile = userProfile ?? this.userProfile
    ..groupProfile = groupProfile ?? this.groupProfile
    ..subType = subType ?? this.subType
    ..isinfocompleted = isinfocompleted ?? this.isinfocompleted;
}