copyWith method

ProfileModel copyWith({
  1. int? id,
  2. String? firstName,
  3. String? lastName,
  4. String? middleName,
  5. String? phone,
  6. String? profilePhoto,
  7. num? balance,
  8. num? unseenNotificationCount,
  9. num? averageRating,
  10. num? orderCount,
  11. num? medalLevel,
  12. num? activity,
  13. bool? myId,
  14. int? equipmentId,
  15. bool? selfEmploymentStatusSet,
  16. bool? passedTest,
  17. bool? commissionerIsSet,
  18. bool? isWorking,
  19. bool? visitedOffice,
  20. bool? drivingLicenseUploaded,
  21. bool? drivingLicenseApproved,
  22. String? email,
  23. String? lockerSyncValue,
  24. List<int>? seenHints,
  25. StatisticModel? stats,
  26. bool? isBlocked,
  27. DateTime? blockedTill,
})

Implementation

ProfileModel copyWith(
        {int? id,
        String? firstName,
        String? lastName,
        String? middleName,
        String? phone,
        String? profilePhoto,
        num? balance,
        num? unseenNotificationCount,
        num? averageRating,
        num? orderCount,
        num? medalLevel,
        num? activity,
        bool? myId,
        int? equipmentId,
        bool? selfEmploymentStatusSet,
        bool? passedTest,
        bool? commissionerIsSet,
        bool? isWorking,
        bool? visitedOffice,
        bool? drivingLicenseUploaded,
        bool? drivingLicenseApproved,
        String? email,
        String? lockerSyncValue,
        List<int>? seenHints,
        StatisticModel? stats,
        bool? isBlocked,
        DateTime? blockedTill}) =>
    ProfileModel(
      id: id ?? this.id,
      firstName: firstName ?? this.firstName,
      lastName: lastName ?? this.lastName,
      middleName: middleName ?? this.middleName,
      phone: phone ?? this.phone,
      profilePhoto: profilePhoto ?? this.profilePhoto,
      balance: balance ?? this.balance,
      commissionerIsSet: commissionerIsSet ?? this.commissionerIsSet,
      myId: myId ?? this.myId,
      equipmentId: equipmentId ?? this.equipmentId,
      selfEmploymentStatusSet:
          selfEmploymentStatusSet ?? this.selfEmploymentStatusSet,
      isWorking: isWorking ?? this.isWorking,
      passedTest: passedTest ?? this.passedTest,
      visitedOffice: visitedOffice ?? this.visitedOffice,
      drivingLicenseUploaded:
          drivingLicenseUploaded ?? this.drivingLicenseUploaded,
      drivingLicenseApproved:
          drivingLicenseApproved ?? this.drivingLicenseApproved,
      email: email ?? this.email,
      seenHints: seenHints ?? this.seenHints,
      stats: stats ?? this.stats,
      lockerSyncValue: lockerSyncValue ?? this.lockerSyncValue,
      isBlocked: isBlocked ?? this.isBlocked,
      blockedTill: blockedTill ?? this.blockedTill,
      unseenNotificationCount:
          unseenNotificationCount ?? this.unseenNotificationCount,
      averageRating: averageRating ?? this.averageRating,
      orderCount: orderCount ?? this.orderCount,
      medalLevel: medalLevel ?? this.medalLevel,
      activity: activity ?? this.activity,
    );