deleteEvent method Null safety

Future<bool?> deleteEvent(
  1. {required String calendarId,
  2. required String eventId}
)

Deletes the selected event in the selected calendar

Implementation

Future<bool?> deleteEvent({
  required String calendarId,
  required String eventId,
}) async {
  bool? isDeleted = false;
  try {
    isDeleted = await _channel.invokeMethod(
      'deleteEvent',
      <String, Object?>{
        'calendarId': calendarId,
        'eventId': eventId,
      },
    );
  } catch (e) {
    print(e);
  }
  return isDeleted;
}