From 5965c0c6e89c8eb191187fc2071769afd4e188ec Mon Sep 17 00:00:00 2001 From: Ralph Maalouf Date: Wed, 27 Sep 2023 23:31:30 +0200 Subject: [PATCH] Fixed issue with overlapping events --- lib/src/extensions.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/extensions.dart b/lib/src/extensions.dart index c852bbbe..118eb1c8 100644 --- a/lib/src/extensions.dart +++ b/lib/src/extensions.dart @@ -171,7 +171,7 @@ extension MyList on List { void addEventInSortedManner(CalendarEventData event) { var addIndex = -1; for (var i = 0; i < this.length; i++) { - if (event.startTime!.compareTo(this[i].startTime!) <= 0) { + if ( event.startTime!.compareTo(this[i].startTime!) <= 0 && event.endTime!.compareTo(this[i].endTime!) >= 0) { addIndex = i; break; }