Event.fromMap constructor

Event.fromMap(
  1. String oldId,
  2. Map body
)

Implementation

Event.fromMap(String oldId, Map body) : super.fromMap(oldId, body) {
  // this.location = body['dl'];
  this.category = (body['ec'] == ActionTracking)
      ? EventCategory.Action_Tracking
      : EventCategory.User_Engagement;
  this.action = body['ea'] ?? "";
  this.label = body['el'];
  this.value = body["ev"];
  this.type = HitCategory.EVENT;
}