This commit is contained in:
wyf
2025-05-22 08:56:27 +08:00
parent 489e907e00
commit 8a418c9c98
39 changed files with 5964 additions and 144 deletions

View File

@@ -304,15 +304,63 @@ class _HomePageState extends State<HomePage> {
),
),
Obx(() {
return Text(
"嘉兴 " +
"${weatherModelController.model.weather_info ?? '未知数据'.tr}",
style: TextStyle(
color: themeController
.currentColor.sc4,
fontSize: AppConstants()
.normal_text_fontSize,
),
return Row(
children: [
Text(
"${weatherModelController.model.cityName??'未知数据'.tr}",
style: TextStyle(
color: themeController
.currentColor.sc4,
fontSize: AppConstants()
.normal_text_fontSize,
),
),
Text(
"${(weatherModelController.model.current_temperature != null && weatherModelController.model.current_temperature! > 0) ? weatherModelController.model.current_temperature : '未知数据'.tr}" +
"°C",
style: TextStyle(
color: themeController
.currentColor.sc4,
fontSize: AppConstants()
.normal_text_fontSize,
),
),
Text(
"${(weatherModelController.model.weather_info?.isNotEmpty ?? false) ? weatherModelController.model.weather_info : '未知数据'.tr}",
style: TextStyle(
color: themeController
.currentColor.sc4,
fontSize: AppConstants()
.normal_text_fontSize,
),
),
if (weatherModelController
.model
.weatherIconurl !=
null &&
weatherModelController
.model
.weatherIconurl!
.isNotEmpty)
Container(
width: 35.rpx,
height: 26.rpx,
clipBehavior:
Clip.antiAlias,
decoration:
BoxDecoration(
shape: BoxShape
.circle),
child: Image.network(
weatherModelController
.model
.weatherIconurl!,
fit: BoxFit.cover,
),
),
].divide(SizedBox(
width: 20.rpx,
)),
);
}),
],