mirror of
https://github.com/Iconica-Development/flutter_availability.git
synced 2025-05-19 05:03:44 +02:00
fix: use isBefore method rather than the compare for readability (and fix a bug)
This commit is contained in:
parent
ec47ed4696
commit
5f5a4a47aa
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ class AvailabilityModel {
|
|||
|
||||
/// Verify the validity of this availability
|
||||
void validate() {
|
||||
if (startDate.compareTo(endDate) < 0) {
|
||||
if (!startDate.isBefore(endDate)) {
|
||||
throw AvailabilityEndBeforeStartException();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue