copyWith method

ProjectState copyWith({
  1. int? projectId,
  2. String? projectName,
  3. String? client,
  4. String? reference,
  5. String? ownerPhone,
  6. String? ownerEmail,
  7. ElectricalNode? root,
  8. BudgetConfig? budgetConfig,
  9. bool? isSaving,
  10. String? errorMessage,
  11. bool? saveSuccess,
  12. String? electricalStandardId,
  13. String? supplyVoltage,
  14. String? installationUsage,
  15. double? expectedPower,
  16. double? powerFactor,
  17. bool? requiresTechProject,
  18. bool? isNewLink,
})

Implementation

ProjectState copyWith({
  int? projectId,
  String? projectName,
  String? client,
  String? reference,
  String? ownerPhone,
  String? ownerEmail,
  ElectricalNode? root,
  BudgetConfig? budgetConfig,
  bool? isSaving,
  String? errorMessage,
  bool? saveSuccess,
  String? electricalStandardId,
  String? supplyVoltage,
  String? installationUsage,
  double? expectedPower,
  double? powerFactor,
  bool? requiresTechProject,
  bool? isNewLink,
}) {
  return ProjectState(
    projectId: projectId ?? this.projectId,
    projectName: projectName ?? this.projectName,
    client: client ?? this.client,
    reference: reference ?? this.reference,
    ownerPhone: ownerPhone ?? this.ownerPhone,
    ownerEmail: ownerEmail ?? this.ownerEmail,
    root: root ?? this.root,
    budgetConfig: budgetConfig ?? this.budgetConfig,
    isSaving: isSaving ?? this.isSaving,
    errorMessage: errorMessage,
    saveSuccess: saveSuccess ?? this.saveSuccess,
    electricalStandardId: electricalStandardId ?? this.electricalStandardId,
    supplyVoltage: supplyVoltage ?? this.supplyVoltage,
    installationUsage: installationUsage ?? this.installationUsage,
    expectedPower: expectedPower ?? this.expectedPower,
    powerFactor: powerFactor ?? this.powerFactor,
    requiresTechProject: requiresTechProject ?? this.requiresTechProject,
    isNewLink: isNewLink ?? this.isNewLink,
  );
}