Map<DateTime, List<Event>> kEventSource = {};
(snapshot.data).forEach((element) {
kEventSource[DateTime(
element.time.year,
element.time.month,
element.time.day,
)] = kEventSource[DateTime(
element.time.year,
element.time.month,
element.time.day,
)] !=
null
? [
...kEventSource[DateTime(
element.time.year,
element.time.month,
element.time.day,
)],
element
]
: [element];
});