WeatherDailyResp.fromMap constructor

WeatherDailyResp.fromMap(
  1. Map map
)

fromMap

Implementation

WeatherDailyResp.fromMap(Map<dynamic, dynamic> map) {
  code = map['code'] as String;
  basic = Basic.fromMap(map['basic'] ?? Map());
  refer = Refer.fromMap(map['refer'] ?? Map());
  daily = map.containsKey('daily')
      ? (map['daily'] as List).map((v) => WeatherDaily.fromMap(v)).toList()
      : [];
}