isMidnight property
Checks if the current time is exactly midnight (00:00:00.000000).
All time components — including milliseconds and microseconds — must be zero. A time of 00:00:00.001 is not considered midnight.
Returns: bool: True if the time is exactly midnight, false otherwise. Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
bool get isMidnight =>
hour == 0 && minute == 0 && second == 0 && millisecond == 0 && microsecond == 0;