isNull property

bool get isNull

Returns true if the given DateTime? instance is null.

This extension allows easy null checking on a nullable DateTime without needing to directly compare it to null.

Example usage:

DateTime? date = null;
print(date.isNull); // Output: true

DateTime? anotherDate = DateTime.now();
print(anotherDate.isNull); // Output: false

Implementation

bool get isNull => this == null;