copyWith method

UserRow copyWith({
  1. String? id,
  2. String? num,
  3. Value<String?> name = const Value.absent(),
  4. Value<String?> bio = const Value.absent(),
  5. Value<String?> avatar = const Value.absent(),
  6. Value<String?> callCover = const Value.absent(),
  7. int? mutualContactsCount,
  8. bool? online,
  9. Value<int?> presenceIndex = const Value.absent(),
  10. Value<String?> status = const Value.absent(),
  11. bool? isDeleted,
  12. Value<String?> dialog = const Value.absent(),
  13. Value<String?> isBlocked = const Value.absent(),
  14. Value<PreciseDateTime?> lastSeenAt = const Value.absent(),
  15. String? contacts,
  16. String? ver,
  17. String? blockedVer,
  18. Value<String?> welcomeMessage = const Value.absent(),
})

Implementation

UserRow copyWith(
        {String? id,
        String? num,
        Value<String?> name = const Value.absent(),
        Value<String?> bio = const Value.absent(),
        Value<String?> avatar = const Value.absent(),
        Value<String?> callCover = const Value.absent(),
        int? mutualContactsCount,
        bool? online,
        Value<int?> presenceIndex = const Value.absent(),
        Value<String?> status = const Value.absent(),
        bool? isDeleted,
        Value<String?> dialog = const Value.absent(),
        Value<String?> isBlocked = const Value.absent(),
        Value<PreciseDateTime?> lastSeenAt = const Value.absent(),
        String? contacts,
        String? ver,
        String? blockedVer,
        Value<String?> welcomeMessage = const Value.absent()}) =>
    UserRow(
      id: id ?? this.id,
      num: num ?? this.num,
      name: name.present ? name.value : this.name,
      bio: bio.present ? bio.value : this.bio,
      avatar: avatar.present ? avatar.value : this.avatar,
      callCover: callCover.present ? callCover.value : this.callCover,
      mutualContactsCount: mutualContactsCount ?? this.mutualContactsCount,
      online: online ?? this.online,
      presenceIndex:
          presenceIndex.present ? presenceIndex.value : this.presenceIndex,
      status: status.present ? status.value : this.status,
      isDeleted: isDeleted ?? this.isDeleted,
      dialog: dialog.present ? dialog.value : this.dialog,
      isBlocked: isBlocked.present ? isBlocked.value : this.isBlocked,
      lastSeenAt: lastSeenAt.present ? lastSeenAt.value : this.lastSeenAt,
      contacts: contacts ?? this.contacts,
      ver: ver ?? this.ver,
      blockedVer: blockedVer ?? this.blockedVer,
      welcomeMessage:
          welcomeMessage.present ? welcomeMessage.value : this.welcomeMessage,
    );