Open AniketStemmOne opened 1 month ago
Hi, so in the code you provided the test
always returns true
which means it will update the first event. see this for how the updateEvent works
You should have the test function return true for the event you want to update,
ex. You want to update the event where the EventData matches someEvent
.
eventController.updateEvent(
modifiable: true,
newDateTimeRange: DateTimeRange(
start: task.startDate!,
end: task.endDate!),
newEventData: task,
test: (calendarEvent) {
return calendarEvent.eventData == someEvent.eventData;
},
);
If there are multiple events on single day, if we edit any of it the first event will be also be updated by same value
how to fix it ??
eventController.updateEvent( modifiable: true, newDateTimeRange: DateTimeRange( start: task.startDate!, end: task.endDate!), newEventData: task, test: (calendarEvent) { return true; }, );