checkIfBeneficiaryReferred function
Implementation
bool checkIfBeneficiaryReferred(
List<ReferralModel>? referrals,
ProjectCycle? currentCycle,
) {
if (currentCycle?.startDate != null && currentCycle?.endDate != null) {
final isBeneficiaryReferred = (referrals != null &&
(referrals ?? []).isNotEmpty &&
referrals.last.clientAuditDetails!.createdTime >=
currentCycle!.startDate &&
referrals.last.clientAuditDetails!.createdTime <= currentCycle.endDate);
return isBeneficiaryReferred;
} else {
return false;
}
}