copyWith method

MyUserRow copyWith({
  1. String? id,
  2. String? num,
  3. Value<String?> login = const Value.absent(),
  4. Value<String?> name = const Value.absent(),
  5. Value<String?> bio = const Value.absent(),
  6. bool? hasPassword,
  7. String? emails,
  8. String? phones,
  9. Value<String?> chatDirectLink = const Value.absent(),
  10. int? unreadChatsCount,
  11. Value<String?> status = const Value.absent(),
  12. Value<String?> avatar = const Value.absent(),
  13. Value<String?> callCover = const Value.absent(),
  14. int? presenceIndex,
  15. bool? online,
  16. Value<String?> muted = const Value.absent(),
  17. Value<int?> blocklistCount = const Value.absent(),
  18. Value<PreciseDateTime?> lastSeenAt = const Value.absent(),
  19. String? ver,
  20. 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,
    );