copyWith method

OnboardingState copyWith({
  1. int? currentStep,
  2. int? totalSteps,
  3. List<OnboardingStepConfig>? stepConfigs,
  4. bool? isLoading,
  5. bool? isSaving,
  6. String? error,
  7. DateTime? lastSavedAt,
  8. String? personalName,
  9. String? personalEmail,
  10. String? personalPhone,
  11. String? personalDni,
  12. String? engineerId,
  13. ProfessionalType? professionalType,
  14. String? companyCif,
  15. String? companyName,
  16. String? companyAddress,
  17. String? locale,
  18. AppThemeMode? themePreference,
  19. TextSizePreference? textSizePreference,
  20. bool? notificationsEnabled,
})

Implementation

OnboardingState copyWith({
  int? currentStep,
  int? totalSteps,
  List<OnboardingStepConfig>? stepConfigs,
  bool? isLoading,
  bool? isSaving,
  String? error,
  DateTime? lastSavedAt,
  String? personalName,
  String? personalEmail,
  String? personalPhone,
  String? personalDni,
  String? engineerId,
  ProfessionalType? professionalType,
  String? companyCif,
  String? companyName,
  String? companyAddress,
  String? locale,
  AppThemeMode? themePreference,
  TextSizePreference? textSizePreference,
  bool? notificationsEnabled,
}) {
  return OnboardingState(
    currentStep: currentStep ?? this.currentStep,
    totalSteps: totalSteps ?? this.totalSteps,
    stepConfigs: stepConfigs ?? this.stepConfigs,
    isLoading: isLoading ?? this.isLoading,
    isSaving: isSaving ?? this.isSaving,
    error: error,
    lastSavedAt: lastSavedAt ?? this.lastSavedAt,
    personalName: personalName ?? this.personalName,
    personalEmail: personalEmail ?? this.personalEmail,
    personalPhone: personalPhone ?? this.personalPhone,
    personalDni: personalDni ?? this.personalDni,
    engineerId: engineerId ?? this.engineerId,
    professionalType: professionalType ?? this.professionalType,
    companyCif: companyCif ?? this.companyCif,
    companyName: companyName ?? this.companyName,
    companyAddress: companyAddress ?? this.companyAddress,
    locale: locale ?? this.locale,
    themePreference: themePreference ?? this.themePreference,
    textSizePreference: textSizePreference ?? this.textSizePreference,
    notificationsEnabled: notificationsEnabled ?? this.notificationsEnabled,
  );
}