recordedSideEffect function
bool
recordedSideEffect(
- ProjectCycle? selectedCycle,
- TaskModel? task,
- List<
SideEffectModel> ? sideEffects
Implementation
bool recordedSideEffect(
ProjectCycle? selectedCycle,
TaskModel? task,
List<SideEffectModel>? sideEffects,
) {
if (selectedCycle != null &&
selectedCycle.startDate != null &&
selectedCycle.endDate != null) {
if ((task != null) && (sideEffects ?? []).isNotEmpty) {
final lastTaskCreatedTime =
task.clientReferenceId == sideEffects?.last.taskClientReferenceId
? task.clientAuditDetails?.createdTime
: null;
return lastTaskCreatedTime != null &&
lastTaskCreatedTime >= selectedCycle.startDate &&
lastTaskCreatedTime <= selectedCycle.endDate;
}
}
return false;
}