getClearLeadMode method

String getClearLeadMode(
  1. Datum content,
  2. String buttonStatus,
  3. bool clearleadcheck
)

Implementation

String getClearLeadMode(
    Datum content, String buttonStatus, bool clearleadcheck) {
  if (!clearleadcheck) {
    return buttonStatus;
  }
  Contentdetail contentdetail = content.contentdetails![0];
  int clearLeadDuration = contentdetail.clearlead ?? 0;
  if (clearLeadDuration == 0) {
    return buttonStatus;
  }
  return clearLead;
}