copyWith method

DepartmentData copyWith({
  1. int? id,
  2. String? code,
  3. String? name,
  4. int? companyId,
  5. Value<int?> managerId = const Value.absent(),
  6. Value<String?> imagePath = const Value.absent(),
  7. Value<String?> description = const Value.absent(),
})

Implementation

DepartmentData copyWith({
  int? id,
  String? code,
  String? name,
  int? companyId,
  Value<int?> managerId = const Value.absent(),
  Value<String?> imagePath = const Value.absent(),
  Value<String?> description = const Value.absent(),
}) => DepartmentData(
  id: id ?? this.id,
  code: code ?? this.code,
  name: name ?? this.name,
  companyId: companyId ?? this.companyId,
  managerId: managerId.present ? managerId.value : this.managerId,
  imagePath: imagePath.present ? imagePath.value : this.imagePath,
  description: description.present ? description.value : this.description,
);