|
|
|
@ -9,8 +9,6 @@ class WeatherDayCard extends StatelessWidget { |
|
|
|
|
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
final Map weatherDays = data?['weatherDays'].first; |
|
|
|
|
|
|
|
return Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
@ -19,14 +17,14 @@ class WeatherDayCard extends StatelessWidget { |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
weatherDays['date'], |
|
|
|
data?['date'], |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
fontSize: 10.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
'${weatherDays['maxTemperature']}°', |
|
|
|
'${data?['temperature']}°', |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
fontSize: 30.sp, |
|
|
|
@ -43,49 +41,49 @@ class WeatherDayCard extends StatelessWidget { |
|
|
|
size: 18.w, |
|
|
|
), |
|
|
|
Text( |
|
|
|
'${weatherDays['weatherCondition']},${weatherDays['windDirection']}', |
|
|
|
'${data?['weatherCondition']},${data?['windDirection']}', |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
fontSize: 14.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
'最\n高', |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
fontSize: 10.sp, |
|
|
|
height: 1, |
|
|
|
), |
|
|
|
), |
|
|
|
5.horizontalSpace, |
|
|
|
Text( |
|
|
|
'${weatherDays['maxTemperature']}°', |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
fontSize: 20.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
10.horizontalSpace, |
|
|
|
Text( |
|
|
|
'最\n低', |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
fontSize: 10.sp, |
|
|
|
height: 1, |
|
|
|
), |
|
|
|
), |
|
|
|
5.horizontalSpace, |
|
|
|
Text( |
|
|
|
'${weatherDays['minTemperature']}°', |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
fontSize: 20.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
// Row( |
|
|
|
// children: [ |
|
|
|
// Text( |
|
|
|
// '最\n高', |
|
|
|
// style: TextStyle( |
|
|
|
// color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
// fontSize: 10.sp, |
|
|
|
// height: 1, |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// 5.horizontalSpace, |
|
|
|
// Text( |
|
|
|
// '${data?['maxTemperature']}°', |
|
|
|
// style: TextStyle( |
|
|
|
// color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
// fontSize: 20.sp, |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// 10.horizontalSpace, |
|
|
|
// Text( |
|
|
|
// '最\n低', |
|
|
|
// style: TextStyle( |
|
|
|
// color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
// fontSize: 10.sp, |
|
|
|
// height: 1, |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// 5.horizontalSpace, |
|
|
|
// Text( |
|
|
|
// '${data?['minTemperature']}°', |
|
|
|
// style: TextStyle( |
|
|
|
// color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
// fontSize: 20.sp, |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ], |
|
|
|
// ), |
|
|
|
], |
|
|
|
), |
|
|
|
], |
|
|
|
|