TodayWeatherBean.fromJson constructor
TodayWeatherBean.fromJson(
- Map<String, dynamic> json
)
Implementation
factory TodayWeatherBean.fromJson(Map<String, dynamic> json) =>
TodayWeatherBean(
city: json["city"] ?? "",
lunar: json["lunar"] ?? "",
festival: json["festival"] ?? "",
pm25: json["pm25"] ?? -1,
temp: json["temp"] ?? -1,
weatherId: json["weatherId"] ?? -1,
sunriseHour: json["sunriseHour"] ?? 0,
sunriseMinute: json["sunriseMinute"] ?? 0,
sunsetHour: json["sunsetHour"] ?? 0,
sunsetMinute: json["sunsetMinute"] ?? 0,
);