HistoricalMetricResult.fromJson constructor

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

Implementation

factory HistoricalMetricResult.fromJson(Map<String, dynamic> json) {
  return HistoricalMetricResult(
    collections: (json['Collections'] as List?)
        ?.whereNotNull()
        .map((e) => HistoricalMetricData.fromJson(e as Map<String, dynamic>))
        .toList(),
    dimensions: json['Dimensions'] != null
        ? Dimensions.fromJson(json['Dimensions'] as Map<String, dynamic>)
        : null,
  );
}