difference method
Returns the difference between this date and withThis
as a Duration.
If either is null, returns Duration.zero.
Implementation
Duration difference({required DateTime? withThis}) {
if (this == null || withThis == null) return Duration.zero;
return this!.difference(withThis);
}