deleteEventInstance method
Delete a specific instance of a recurring event
calendarId - The ID of the calendar
eventId - The ID of the event
startDate - The start date of the specific instance to delete
followingInstances - Whether to delete following instances as well
Returns true if the event instance was successfully deleted Throws PermissionDeniedException if permissions are not granted Throws EventNotFoundException if the event doesn't exist
Implementation
@override
Future<bool> deleteEventInstance(
String calendarId,
String eventId,
DateTime startDate, {
bool followingInstances = false,
}) async {
try {
final result = await _methodChannel.invokeMethod<bool>(
'deleteEventInstance',
{
'calendarId': calendarId,
'eventId': eventId,
'startDate': startDate.millisecondsSinceEpoch,
'followingInstances': followingInstances,
},
);
return result ?? false;
} on PlatformException catch (e) {
throw _mapPlatformException(e);
}
}