isBeforeNow method
Checks if the date is in the past compared to the current date and time.
Args:
now
(DateTime?, optional): The current date and time. Defaults to
null (uses the actual current date and time).
Returns: bool: True if the date is in the past, False otherwise.
Implementation
bool isBeforeNow([DateTime? now]) {
now ??= DateTime.now();
return isBefore(now);
}