InternalDelete method

  1. @override
Future<void> InternalDelete(
  1. DeleteMode deleteMode,
  2. SendCancellationsMode? sendCancellationsMode,
  3. AffectedTaskOccurrence? affectedTaskOccurrences, [
  4. bool suppressReadReceipts = false,
])
override
Deletes the object. The deletion mode. Indicates whether meeting cancellation messages should be sent. Indicate which occurrence of a recurring task should be deleted. Whether to suppress read receipts

Implementation

@override
Future<void> InternalDelete(
  DeleteMode deleteMode,
  SendCancellationsMode? sendCancellationsMode,
  AffectedTaskOccurrence? affectedTaskOccurrences, [
  bool suppressReadReceipts = false,
]) {
  ThrowIfThisIsNew();
  ThrowIfThisIsAttachment();

  // If sendCancellationsMode is null, use the default value that's appropriate for item type.
  sendCancellationsMode ??= DefaultSendCancellationsMode;

  // If affectedTaskOccurrences is null, use the default value that's appropriate for item type.
  affectedTaskOccurrences ??= DefaultAffectedTaskOccurrences;

  return Service.DeleteItem(
    Id,
    deleteMode,
    sendCancellationsMode,
    affectedTaskOccurrences,
    suppressReadReceipts,
  );
}