getTableCellText method

String getTableCellText(
  1. StatusKeys statusKeys,
  2. List<TaskModel>? taskData
)

Implementation

String getTableCellText(
  StatusKeys statusKeys,
  List<TaskModel>? taskData,
) {
  if (statusKeys.isNotEligible) {
    return localizations.translate(
        i18.householdOverView.householdOverViewNotEligibleIconLabel);
  } else if (statusKeys.isBeneficiaryReferred) {
    return localizations.translate(Status.beneficiaryReferred.toValue());
  } else if (taskData != null) {
    if (taskData.isEmpty) {
      return localizations.translate(Status.notVisited.toValue());
    } else if (statusKeys.isBeneficiaryRefused && !statusKeys.isStatusReset) {
      return localizations.translate(Status.beneficiaryRefused.toValue());
    } else if (statusKeys.isStatusReset) {
      return localizations.translate(Status.notVisited.toValue());
    } else {
      return localizations.translate(Status.visited.toValue());
    }
  } else {
    return localizations.translate(Status.notVisited.toValue());
  }
}