isAtSameDay method Null safety

bool isAtSameDay(
  1. DateTime? day1,
  2. DateTime? day2
)

Implementation

bool isAtSameDay(DateTime? day1, DateTime? day2) {
  return day1 != null &&
      day2 != null &&
      day1.difference(day2).inDays == 0 &&
      day1.day == day2.day;
}