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:
@@ -22,6 +22,10 @@ Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
// Hide status bar for TV immersive experience
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
||||
await SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.landscapeLeft,
|
||||
DeviceOrientation.landscapeRight,
|
||||
]);
|
||||
GoogleFonts.config.allowRuntimeFetching = false;
|
||||
|
||||
await initializeDateFormatting();
|
||||
@@ -136,19 +140,7 @@ class AdaptiveHome extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const forceTv = String.fromEnvironment('FORCE_TV', defaultValue: 'false');
|
||||
if (forceTv.toLowerCase() == 'true') {
|
||||
return const TvDashboardScreen();
|
||||
}
|
||||
|
||||
final size = MediaQuery.of(context).size;
|
||||
final shortestSide = size.shortestSide;
|
||||
final isMobile = shortestSide < 600;
|
||||
|
||||
if (isMobile) {
|
||||
return const MobileHomeScreen();
|
||||
}
|
||||
|
||||
// Forcing TV Dashboard for Google TV deployment
|
||||
return const TvDashboardScreen();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user