HourInfo.fromJson constructor

HourInfo.fromJson(
  1. Map json_
)

Implementation

HourInfo.fromJson(core.Map json_)
    : this(
        dateTime: json_.containsKey('dateTime')
            ? json_['dateTime'] as core.String
            : null,
        healthRecommendations: json_.containsKey('healthRecommendations')
            ? HealthRecommendations.fromJson(json_['healthRecommendations']
                as core.Map<core.String, core.dynamic>)
            : null,
        indexes: json_.containsKey('indexes')
            ? (json_['indexes'] as core.List)
                .map((value) => AirQualityIndex.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        pollutants: json_.containsKey('pollutants')
            ? (json_['pollutants'] as core.List)
                .map((value) => Pollutant.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );