isAfter method

bool isAfter(
  1. LocalDateTime other
)

Returns true if this instance is later than other.

Example:

final dt1 = LocalDateTime.of(2024, 6, 27, 14, 30);
final dt2 = LocalDateTime.of(2024, 6, 27, 15, 30);
print(dt1.isAfter(dt2)); // false
print(dt2.isAfter(dt1)); // true

Implementation

bool isAfter(LocalDateTime other) => compareTo(other).isGreaterThan(0);