isBeforeNullable method

bool isBeforeNullable(
  1. DateTime? other
)

Extension method to check if this DateTime is before another DateTime.

Returns false if other is null, otherwise returns the result of comparing this DateTime with other using the isBefore method.

Implementation

bool isBeforeNullable(DateTime? other) {
  if (other == null) {
    return false;
  }
  return isBefore(other);
}