addEvent method
Implementation
void addEvent(EventData newEvent) {
Map<String, dynamic> eventInfo = Map();
eventInfo[titleKey] = newEvent.title;
eventInfo[descriptionKey] = newEvent.description;
eventInfo[dateKey] = newEvent.date;
eventInfo[timeKey] = newEvent.time;
eventInfo[pointRewardKey] = newEvent.pointReward;
eventInfo[locationKey] = newEvent.location;
eventInfo[sourceKey] = newEvent.source;
eventInfo[typeKey] = newEvent.type;
eventInfo[qrCodeKey] = "";
database.collection(eventsCollection).add(eventInfo);
}