MetricSummary.fromJson constructor

MetricSummary.fromJson(
  1. Map<String, dynamic> data
)

Deserializes a MetricSummary from JSON Map.

Implementation

factory MetricSummary.fromJson(Map<String, dynamic> data) {
  final json = AccessAwareMap(data);
  return MetricSummary(
    min: json['min'],
    max: json['max'],
    count: json['count'],
    sum: json['sum'],
    tags: json['tags']?.cast<String, String>(),
    unknown: json.notAccessed(),
  );
}