copyWith method

CustomField copyWith({
  1. int? id,
  2. DateTime? dbDateCreated,
  3. DateTime? dbDateUpdated,
  4. CustomFieldStatus? status,
  5. String? term,
  6. String? label,
  7. String? description,
  8. CustomFieldDataType? dataType,
  9. CustomFieldRegistration? registration,
  10. bool? requiredForImport,
  11. bool? requiredForCrewing,
  12. bool? internal,
  13. bool? allowEdit,
  14. bool? requireVerification,
  15. String? choices,
  16. String? widgetConfig,
  17. int? step,
  18. int? section,
  19. List<int>? positions,
})

Implementation

CustomField copyWith(
    {int? id,
    DateTime? dbDateCreated,
    DateTime? dbDateUpdated,
    enums.CustomFieldStatus? status,
    String? term,
    String? label,
    String? description,
    enums.CustomFieldDataType? dataType,
    enums.CustomFieldRegistration? registration,
    bool? requiredForImport,
    bool? requiredForCrewing,
    bool? internal,
    bool? allowEdit,
    bool? requireVerification,
    String? choices,
    String? widgetConfig,
    int? step,
    int? section,
    List<int>? positions}) {
  return CustomField(
      id: id ?? this.id,
      dbDateCreated: dbDateCreated ?? this.dbDateCreated,
      dbDateUpdated: dbDateUpdated ?? this.dbDateUpdated,
      status: status ?? this.status,
      term: term ?? this.term,
      label: label ?? this.label,
      description: description ?? this.description,
      dataType: dataType ?? this.dataType,
      registration: registration ?? this.registration,
      requiredForImport: requiredForImport ?? this.requiredForImport,
      requiredForCrewing: requiredForCrewing ?? this.requiredForCrewing,
      internal: internal ?? this.internal,
      allowEdit: allowEdit ?? this.allowEdit,
      requireVerification: requireVerification ?? this.requireVerification,
      choices: choices ?? this.choices,
      widgetConfig: widgetConfig ?? this.widgetConfig,
      step: step ?? this.step,
      section: section ?? this.section,
      positions: positions ?? this.positions);
}