parseParticipantSnapshot method

Map<ParticipantType, List<String>> parseParticipantSnapshot(
  1. Map<String, dynamic> data
)

Implementation

Map<ParticipantType, List<String>> parseParticipantSnapshot(
  Map<String, dynamic> data,
) {
  return {
    ParticipantType.going: data.entries
        .where((element) => element.value == "gaat")
        .map((e) => e.key)
        .toList(),
    ParticipantType.maybe: data.entries
        .where((element) => element.value == "misschien")
        .map((e) => e.key)
        .toList(),
    ParticipantType.notGoing: data.entries
        .where((element) => element.value == "gaat niet")
        .map((e) => e.key)
        .toList(),
  };
}