ForecastResult.fromJson constructor

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

Implementation

factory ForecastResult.fromJson(Map<String, dynamic> json) {
  return ForecastResult(
    meanValue: json['MeanValue'] as String?,
    predictionIntervalLowerBound:
        json['PredictionIntervalLowerBound'] as String?,
    predictionIntervalUpperBound:
        json['PredictionIntervalUpperBound'] as String?,
    timePeriod: json['TimePeriod'] != null
        ? DateInterval.fromJson(json['TimePeriod'] as Map<String, dynamic>)
        : null,
  );
}