isExpired property

bool get isExpired

Check whether the coupon is expired. If dateExpires is null, the coupon is never expired (return false).

Implementation

bool get isExpired => !(dateExpires?.isAfter(DateTime.now()) ?? true);