isNowOrBeforeCurrentDate static method

bool isNowOrBeforeCurrentDate(
  1. String strDate
)

Implementation

static bool isNowOrBeforeCurrentDate(String strDate) {
  if (strDate.isNotEmpty) {
    var date = DateTime.parse(strDate).toLocal();
    var now = dateNotTime(DateTime.now());
    return date == now || date.isBefore(now);
  }
  return false;
}