toCompanion method
Implementation
ChatsCompanion toCompanion(bool nullToAbsent) {
return ChatsCompanion(
id: Value(id),
avatar:
avatar == null && nullToAbsent ? const Value.absent() : Value(avatar),
name: name == null && nullToAbsent ? const Value.absent() : Value(name),
members: Value(members),
kindIndex: Value(kindIndex),
isHidden: Value(isHidden),
muted:
muted == null && nullToAbsent ? const Value.absent() : Value(muted),
directLink: directLink == null && nullToAbsent
? const Value.absent()
: Value(directLink),
createdAt: Value(createdAt),
updatedAt: Value(updatedAt),
lastReads: Value(lastReads),
lastDelivery: lastDelivery == null && nullToAbsent
? const Value.absent()
: Value(lastDelivery),
firstItem: firstItem == null && nullToAbsent
? const Value.absent()
: Value(firstItem),
lastItem: lastItem == null && nullToAbsent
? const Value.absent()
: Value(lastItem),
lastReadItem: lastReadItem == null && nullToAbsent
? const Value.absent()
: Value(lastReadItem),
unreadCount: Value(unreadCount),
totalCount: Value(totalCount),
ongoingCall: ongoingCall == null && nullToAbsent
? const Value.absent()
: Value(ongoingCall),
favoritePosition: favoritePosition == null && nullToAbsent
? const Value.absent()
: Value(favoritePosition),
membersCount: Value(membersCount),
ver: Value(ver),
lastItemCursor: lastItemCursor == null && nullToAbsent
? const Value.absent()
: Value(lastItemCursor),
lastReadItemCursor: lastReadItemCursor == null && nullToAbsent
? const Value.absent()
: Value(lastReadItemCursor),
recentCursor: recentCursor == null && nullToAbsent
? const Value.absent()
: Value(recentCursor),
favoriteCursor: favoriteCursor == null && nullToAbsent
? const Value.absent()
: Value(favoriteCursor),
);
}