feat: Enhance TV support and Daily Weather Forecast (w/ Air Quality)
- **Frontend (Flutter)**
- Optimize for Google TV: Force Landscape mode, disable touchscreen requirement, and set TV Dashboard as default home.
- Weather Widget:
- Add Daily Max/Min temperature ('최고/최저').
- Add Air Quality Index (AQI) with visual indicator ('미세먼지').
- Increase font sizes and adjust layout to match Digital Clock style.
- Implement 1-hour auto-refresh timer.
- Model: Update WeatherInfo to support tempMin, tempMax, and aqi.
- **Backend (Node.js)**
- Weather API (/api/weather):
- Implement daily forecast aggregation logic (Seoul Time KST) to calculate accurate daily High/Low.
- Integrate OpenWeatherMap Air Pollution API to fetch AQI.
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
class WeatherInfo {
|
||||
final String description;
|
||||
final double temperature;
|
||||
final double tempMin;
|
||||
final double tempMax;
|
||||
final int aqi;
|
||||
final String icon;
|
||||
final String city;
|
||||
|
||||
const WeatherInfo({
|
||||
required this.description,
|
||||
required this.temperature,
|
||||
required this.tempMin,
|
||||
required this.tempMax,
|
||||
required this.aqi,
|
||||
required this.icon,
|
||||
required this.city,
|
||||
});
|
||||
@@ -18,6 +24,9 @@ class WeatherInfo {
|
||||
return WeatherInfo(
|
||||
description: weather["description"] as String? ?? "",
|
||||
temperature: (json["main"]?["temp"] as num?)?.toDouble() ?? 0,
|
||||
tempMin: (json["main"]?["temp_min"] as num?)?.toDouble() ?? 0,
|
||||
tempMax: (json["main"]?["temp_max"] as num?)?.toDouble() ?? 0,
|
||||
aqi: json["aqi"] as int? ?? 0,
|
||||
icon: weather["icon"] as String? ?? "",
|
||||
city: json["name"] as String? ?? "",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user