copyWith method
EmployeeData
copyWith(
{ - int? id,
- String? empNumber,
- String? name,
- String? email,
- int? employeePositionId,
- int? departmentId,
- DateTime? birthday,
- DateTime? hireDate,
- Value<String?> imagePath = const Value.absent(),
- Value<String?> address = const Value.absent(),
})
Implementation
EmployeeData copyWith({
int? id,
String? empNumber,
String? name,
String? email,
int? employeePositionId,
int? departmentId,
DateTime? birthday,
DateTime? hireDate,
Value<String?> imagePath = const Value.absent(),
Value<String?> address = const Value.absent(),
}) => EmployeeData(
id: id ?? this.id,
empNumber: empNumber ?? this.empNumber,
name: name ?? this.name,
email: email ?? this.email,
employeePositionId: employeePositionId ?? this.employeePositionId,
departmentId: departmentId ?? this.departmentId,
birthday: birthday ?? this.birthday,
hireDate: hireDate ?? this.hireDate,
imagePath: imagePath.present ? imagePath.value : this.imagePath,
address: address.present ? address.value : this.address,
);