Weather.fromMap constructor

Weather.fromMap(
  1. dynamic map
)

Implementation

factory Weather.fromMap(dynamic map) {
  return Weather(
    publicTime: _str2dt(map['publicTime'])!,
    publishingOffice: map['publishingOffice'],
    link: map['link'],
    description: WeatherDescription.fromMap(map['description']),
    forecasts: (map['forecasts'] as List)
        .map((f) => WeatherForecast.fromMap(f))
        .toList(),
    location: WeatherLocation.fromMap(map['location']),
  );
}