calendarAnoymizer function Null safety

Datum calendarAnoymizer(
  1. Datum datum
)

A CalendarDatum anonymizer function. Anonymizes each CalendarEvent entry in the calendar using the calendarEventAnoymizer function.

Implementation

Datum calendarAnoymizer(Datum datum) {
  assert(datum is CalendarDatum);
  CalendarDatum calendar = datum as CalendarDatum;
  calendar.calendarEvents.forEach((event) => calendarEventAnoymizer(event));
  return calendar;
}