copyWithCompanion method

ChatRow copyWithCompanion(
  1. ChatsCompanion data
)

Implementation

ChatRow copyWithCompanion(ChatsCompanion data) {
  return ChatRow(
    id: data.id.present ? data.id.value : this.id,
    avatar: data.avatar.present ? data.avatar.value : this.avatar,
    name: data.name.present ? data.name.value : this.name,
    members: data.members.present ? data.members.value : this.members,
    kindIndex: data.kindIndex.present ? data.kindIndex.value : this.kindIndex,
    isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden,
    muted: data.muted.present ? data.muted.value : this.muted,
    directLink:
        data.directLink.present ? data.directLink.value : this.directLink,
    createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
    updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
    lastReads: data.lastReads.present ? data.lastReads.value : this.lastReads,
    lastDelivery: data.lastDelivery.present
        ? data.lastDelivery.value
        : this.lastDelivery,
    firstItem: data.firstItem.present ? data.firstItem.value : this.firstItem,
    lastItem: data.lastItem.present ? data.lastItem.value : this.lastItem,
    lastReadItem: data.lastReadItem.present
        ? data.lastReadItem.value
        : this.lastReadItem,
    unreadCount:
        data.unreadCount.present ? data.unreadCount.value : this.unreadCount,
    totalCount:
        data.totalCount.present ? data.totalCount.value : this.totalCount,
    ongoingCall:
        data.ongoingCall.present ? data.ongoingCall.value : this.ongoingCall,
    favoritePosition: data.favoritePosition.present
        ? data.favoritePosition.value
        : this.favoritePosition,
    membersCount: data.membersCount.present
        ? data.membersCount.value
        : this.membersCount,
    ver: data.ver.present ? data.ver.value : this.ver,
    lastItemCursor: data.lastItemCursor.present
        ? data.lastItemCursor.value
        : this.lastItemCursor,
    lastReadItemCursor: data.lastReadItemCursor.present
        ? data.lastReadItemCursor.value
        : this.lastReadItemCursor,
    recentCursor: data.recentCursor.present
        ? data.recentCursor.value
        : this.recentCursor,
    favoriteCursor: data.favoriteCursor.present
        ? data.favoriteCursor.value
        : this.favoriteCursor,
  );
}