更新
This commit is contained in:
@@ -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,
|
||||
)),
|
||||
);
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user