diff --git a/lib/src/model/date/date_range_item.dart b/lib/src/model/date/date_range_item.dart index bb946446..e7cd8ddf 100644 --- a/lib/src/model/date/date_range_item.dart +++ b/lib/src/model/date/date_range_item.dart @@ -58,12 +58,13 @@ class DateRangeItem extends Item with DateRanger { @override bool operator ==(Object other) => + super == other && other is DateRangeItem && startDate == other.startDate && endDate == other.endDate; @override - int get hashCode => Object.hash(startDate, endDate); + int get hashCode => Object.hash(super.hashCode, startDate, endDate); @override int compareTo(covariant DateRangeItem other) => diff --git a/lib/src/model/date/holiday.dart b/lib/src/model/date/holiday.dart index 55884e1d..6d417ce9 100644 --- a/lib/src/model/date/holiday.dart +++ b/lib/src/model/date/holiday.dart @@ -23,6 +23,13 @@ class Holiday extends DateRangeItem { ...super.toJson(), _JsonFields.kind: kind.index, }; + + @override + bool operator ==(Object other) => + super == other && other is Holiday && kind == other.kind; + + @override + int get hashCode => Object.hash(super.hashCode, kind.hashCode); } enum HolidayKind { festivity, freeDisposal }