Event.fromMap constructor

Event.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Event.fromMap(Map<String, dynamic> map) {
  return Event(
    eventName: map['eventName'],
    eventMoment: map['eventMoment'],
    revenue: map['revenue'],
    customData: map['customData'] != null
        ? (json.decode(map['customData']) as Map<String, dynamic>)
            .map((key, value) => MapEntry(key, value as String))
        : null,
  );
}