isEqual method

bool isEqual(
  1. Object other
)

Returns true if other is a DateTime at the same moment and in the same time zone (UTC or local).

final dDayUtc = DateTime.utc(1944, 6, 6).notifier;
final dDayLocal = dDayUtc.toLocal();

// These two dates are at the same moment, but are in different zones.
print(dDayUtc.isEqual(dDayLocal)); // true

See isAtSameMomentAs for a comparison that compares moments in time independently of their zones.

Implementation

bool isEqual(Object other) => value == other;