|
|
|
@ -62,7 +62,7 @@ Widget buildWeatherContent(BuildContext context, String city, |
|
|
|
), |
|
|
|
SizedBox(height: 4), |
|
|
|
Text( |
|
|
|
now["weatherCondition"], |
|
|
|
now["dayweather"], |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14, |
|
|
|
color: Colors.white.withOpacity(0.9), |
|
|
|
@ -72,7 +72,7 @@ Widget buildWeatherContent(BuildContext context, String city, |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"${now["temperature"]}°", |
|
|
|
"${now["daytemp"]}°", |
|
|
|
style: const TextStyle( |
|
|
|
fontSize: 36, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
@ -84,14 +84,14 @@ Widget buildWeatherContent(BuildContext context, String city, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
'最高: ${now["maxTemperature"]}°', |
|
|
|
'最高: ${now["daytemp"]}°', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12, |
|
|
|
color: Colors.white.withOpacity(0.9), |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
'最低: ${now["minTemperature"]}°', |
|
|
|
'最低: ${now["nighttemp"]}°', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12, |
|
|
|
color: Colors.white.withOpacity(0.9), |
|
|
|
@ -103,8 +103,8 @@ Widget buildWeatherContent(BuildContext context, String city, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
const Icon( |
|
|
|
Icons.wb_sunny, |
|
|
|
Icon( |
|
|
|
getWeatherIcon(now['dayweather']), |
|
|
|
size: 48, |
|
|
|
color: Colors.white, |
|
|
|
), |
|
|
|
@ -133,10 +133,10 @@ Widget buildWeatherContent(BuildContext context, String city, |
|
|
|
String dateStr = days[index]['date']; |
|
|
|
DateTime? date = DateUtil.getDateTime(dateStr); |
|
|
|
IconData weatherIcon = |
|
|
|
getWeatherIcon(days[index]['weatherCondition']); |
|
|
|
getWeatherIcon(days[index]['dayweather']); |
|
|
|
String weekday = DateUtil.getWeekday(date, |
|
|
|
languageCode: "zh", short: true); |
|
|
|
String temp = "${days[index]['temperature']}°"; |
|
|
|
String temp = "${days[index]['daytemp']}°"; |
|
|
|
return _buildForecastDay( |
|
|
|
weekday, |
|
|
|
weatherIcon, |
|
|
|
|