MetricsEvent.fromJson constructor

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

Implementation

factory MetricsEvent.fromJson(Map<String, dynamic> json) {
  return MetricsEvent(
    metrics: (json['metrics'] as List)
        .map((e) => Metric.fromJson(e as Map<String, dynamic>))
        .toList(),
    title: json['title'] as String,
  );
}