acceptCounter method

VCalendar acceptCounter({
  1. String? comment,
  2. String? description,
})

Accepts a counter proposal.

An organizer can accept the counter proposal and optionally provide the reasoning in the comment. The current method must be Method.counter. The VEvent.sequence stays the same.

Compare counter for attendees to create a counter proposal. Compare declineCounter for organizers to decline a counter proposal.

Implementation

VCalendar acceptCounter({String? comment, String? description}) {
  assert(method == Method.counter,
      'The current method is not Method.counter but instead $method. Only counter proposals can be accepted with acceptCounter.');

  return update(
    method: Method.request,
    eventStatus: EventStatus.confirmed,
    comment: comment,
    description: description,
  );
}