FlagItems method

Future<void> FlagItems(
  1. FolderId? contextFolderId,
  2. DateTime? startDate,
  3. DateTime? dueDate
)
Flags conversation items. Calling this method results in a call to EWS. The Id of the folder items must belong to in order to be flagged. If contextFolderId is null, items in conversation across the entire mailbox are flagged. The start date (can be null). The due date (can be null).

Implementation

Future<void> FlagItems(
  FolderId? contextFolderId,
  DateTime? startDate,
  DateTime? dueDate,
) async {
  Flag flag = Flag()..FlagStatus = ItemFlagStatus.Flagged;

  if (startDate != null) {
    flag.StartDate = startDate;
  }

  if (dueDate != null) {
    flag.DueDate = dueDate;
  }

  await _SetFlagStatusForItemsInConversation(contextFolderId, flag);
}