copyWith method
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(),
})
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,
);