Histogram.fromJson constructor

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

Implementation

factory Histogram.fromJson(Map<String, dynamic> json) {
  return Histogram(
    name: json['name'] as String,
    sum: json['sum'] as int,
    count: json['count'] as int,
    buckets:
        (json['buckets'] as List)
            .map((e) => Bucket.fromJson(e as Map<String, dynamic>))
            .toList(),
  );
}