copyWith method

ChatRow copyWith({
  1. String? id,
  2. Value<String?> avatar = const Value.absent(),
  3. Value<String?> name = const Value.absent(),
  4. String? members,
  5. int? kindIndex,
  6. bool? isHidden,
  7. Value<String?> muted = const Value.absent(),
  8. Value<String?> directLink = const Value.absent(),
  9. PreciseDateTime? createdAt,
  10. PreciseDateTime? updatedAt,
  11. String? lastReads,
  12. Value<PreciseDateTime?> lastDelivery = const Value.absent(),
  13. Value<String?> firstItem = const Value.absent(),
  14. Value<String?> lastItem = const Value.absent(),
  15. Value<String?> lastReadItem = const Value.absent(),
  16. int? unreadCount,
  17. int? totalCount,
  18. Value<String?> ongoingCall = const Value.absent(),
  19. Value<double?> favoritePosition = const Value.absent(),
  20. int? membersCount,
  21. String? ver,
  22. Value<String?> lastItemCursor = const Value.absent(),
  23. Value<String?> lastReadItemCursor = const Value.absent(),
  24. Value<String?> recentCursor = const Value.absent(),
  25. 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,
    );