copyWith method
Implementation
PermissionMapping copyWith() {
return PermissionMapping(
idDataMapping: this.idDataMapping,
idDivision: this.idDivision,
idDepartment: this.idDepartment,
idRole: this.idRole,
idModule: this.idModule,
idPermission: this.idPermission,
idUser: this.idUser,
type: this.type,
)..hasChanged = this.hasChanged; // Add this if your model has an id field
}