Metric.fromJson constructor

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

Implementation

factory Metric.fromJson(Map<String, dynamic> json) {
  return Metric(
    name: json['name'] as String,
    value: json['value'] as num,
  );
}