copyWith method
MyUserRow
copyWith({ - String? id,
- String? num,
- Value<String?> login = const Value.absent(),
- Value<String?> name = const Value.absent(),
- Value<String?> bio = const Value.absent(),
- bool? hasPassword,
- String? emails,
- String? phones,
- Value<String?> chatDirectLink = const Value.absent(),
- int? unreadChatsCount,
- Value<String?> status = const Value.absent(),
- Value<String?> avatar = const Value.absent(),
- Value<String?> callCover = const Value.absent(),
- int? presenceIndex,
- bool? online,
- Value<String?> muted = const Value.absent(),
- Value<int?> blocklistCount = const Value.absent(),
- Value<PreciseDateTime?> lastSeenAt = const Value.absent(),
- String? ver,
- Value<String?> welcomeMessage = const Value.absent(),
})
Implementation
MyUserRow copyWith(
{String? id,
String? num,
Value<String?> login = const Value.absent(),
Value<String?> name = const Value.absent(),
Value<String?> bio = const Value.absent(),
bool? hasPassword,
String? emails,
String? phones,
Value<String?> chatDirectLink = const Value.absent(),
int? unreadChatsCount,
Value<String?> status = const Value.absent(),
Value<String?> avatar = const Value.absent(),
Value<String?> callCover = const Value.absent(),
int? presenceIndex,
bool? online,
Value<String?> muted = const Value.absent(),
Value<int?> blocklistCount = const Value.absent(),
Value<PreciseDateTime?> lastSeenAt = const Value.absent(),
String? ver,
Value<String?> welcomeMessage = const Value.absent()}) =>
MyUserRow(
id: id ?? this.id,
num: num ?? this.num,
login: login.present ? login.value : this.login,
name: name.present ? name.value : this.name,
bio: bio.present ? bio.value : this.bio,
hasPassword: hasPassword ?? this.hasPassword,
emails: emails ?? this.emails,
phones: phones ?? this.phones,
chatDirectLink:
chatDirectLink.present ? chatDirectLink.value : this.chatDirectLink,
unreadChatsCount: unreadChatsCount ?? this.unreadChatsCount,
status: status.present ? status.value : this.status,
avatar: avatar.present ? avatar.value : this.avatar,
callCover: callCover.present ? callCover.value : this.callCover,
presenceIndex: presenceIndex ?? this.presenceIndex,
online: online ?? this.online,
muted: muted.present ? muted.value : this.muted,
blocklistCount:
blocklistCount.present ? blocklistCount.value : this.blocklistCount,
lastSeenAt: lastSeenAt.present ? lastSeenAt.value : this.lastSeenAt,
ver: ver ?? this.ver,
welcomeMessage:
welcomeMessage.present ? welcomeMessage.value : this.welcomeMessage,
);