EventDimensions.fromJson constructor

EventDimensions.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory EventDimensions.fromJson(Map<String, dynamic> json) {
  return EventDimensions(
    attributes: (json['Attributes'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(k, AttributeDimension.fromJson(e as Map<String, dynamic>))),
    eventType: json['EventType'] != null
        ? SetDimension.fromJson(json['EventType'] as Map<String, dynamic>)
        : null,
    metrics: (json['Metrics'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(k, MetricDimension.fromJson(e as Map<String, dynamic>))),
  );
}