Metric.fromJson constructor Null safety

Metric.fromJson(
  1. Map _json
)

Implementation

Metric.fromJson(core.Map _json)
    : this(
        histogram: _json.containsKey('histogram')
            ? (_json['histogram'] as core.List)
                .map((value) => Bin.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        percentiles: _json.containsKey('percentiles')
            ? Percentiles.fromJson(
                _json['percentiles'] as core.Map<core.String, core.dynamic>)
            : null,
      );