copyWith method
ChatRow
copyWith({ - String? id,
- Value<String?> avatar = const Value.absent(),
- Value<String?> name = const Value.absent(),
- String? members,
- int? kindIndex,
- bool? isHidden,
- Value<String?> muted = const Value.absent(),
- Value<String?> directLink = const Value.absent(),
- PreciseDateTime? createdAt,
- PreciseDateTime? updatedAt,
- String? lastReads,
- Value<PreciseDateTime?> lastDelivery = const Value.absent(),
- Value<String?> firstItem = const Value.absent(),
- Value<String?> lastItem = const Value.absent(),
- Value<String?> lastReadItem = const Value.absent(),
- int? unreadCount,
- int? totalCount,
- Value<String?> ongoingCall = const Value.absent(),
- Value<double?> favoritePosition = const Value.absent(),
- int? membersCount,
- String? ver,
- Value<String?> lastItemCursor = const Value.absent(),
- Value<String?> lastReadItemCursor = const Value.absent(),
- Value<String?> recentCursor = const Value.absent(),
- Value<String?> favoriteCursor = const Value.absent(),
})
Implementation
ChatRow copyWith(
{String? id,
Value<String?> avatar = const Value.absent(),
Value<String?> name = const Value.absent(),
String? members,
int? kindIndex,
bool? isHidden,
Value<String?> muted = const Value.absent(),
Value<String?> directLink = const Value.absent(),
PreciseDateTime? createdAt,
PreciseDateTime? updatedAt,
String? lastReads,
Value<PreciseDateTime?> lastDelivery = const Value.absent(),
Value<String?> firstItem = const Value.absent(),
Value<String?> lastItem = const Value.absent(),
Value<String?> lastReadItem = const Value.absent(),
int? unreadCount,
int? totalCount,
Value<String?> ongoingCall = const Value.absent(),
Value<double?> favoritePosition = const Value.absent(),
int? membersCount,
String? ver,
Value<String?> lastItemCursor = const Value.absent(),
Value<String?> lastReadItemCursor = const Value.absent(),
Value<String?> recentCursor = const Value.absent(),
Value<String?> favoriteCursor = const Value.absent()}) =>
ChatRow(
id: id ?? this.id,
avatar: avatar.present ? avatar.value : this.avatar,
name: name.present ? name.value : this.name,
members: members ?? this.members,
kindIndex: kindIndex ?? this.kindIndex,
isHidden: isHidden ?? this.isHidden,
muted: muted.present ? muted.value : this.muted,
directLink: directLink.present ? directLink.value : this.directLink,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
lastReads: lastReads ?? this.lastReads,
lastDelivery:
lastDelivery.present ? lastDelivery.value : this.lastDelivery,
firstItem: firstItem.present ? firstItem.value : this.firstItem,
lastItem: lastItem.present ? lastItem.value : this.lastItem,
lastReadItem:
lastReadItem.present ? lastReadItem.value : this.lastReadItem,
unreadCount: unreadCount ?? this.unreadCount,
totalCount: totalCount ?? this.totalCount,
ongoingCall: ongoingCall.present ? ongoingCall.value : this.ongoingCall,
favoritePosition: favoritePosition.present
? favoritePosition.value
: this.favoritePosition,
membersCount: membersCount ?? this.membersCount,
ver: ver ?? this.ver,
lastItemCursor:
lastItemCursor.present ? lastItemCursor.value : this.lastItemCursor,
lastReadItemCursor: lastReadItemCursor.present
? lastReadItemCursor.value
: this.lastReadItemCursor,
recentCursor:
recentCursor.present ? recentCursor.value : this.recentCursor,
favoriteCursor:
favoriteCursor.present ? favoriteCursor.value : this.favoriteCursor,
);