1.修复睡眠日报中睡眠规律性数据显示错误
2.更新时区设置
This commit is contained in:
@@ -142,22 +142,6 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
// if (d['UTC'] == null ||
|
||||
// d['UTC'].toString().isEmpty) {
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "请选择城市".tr,
|
||||
// textColor: Color(0xFFFF7159));
|
||||
// isValid = false;
|
||||
// break;
|
||||
// }
|
||||
// if (d['city_id'] ==null ||
|
||||
// d['city_id'].toString().isEmpty) {
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "请选择城市".tr,
|
||||
// textColor: Color(0xFFFF7159));
|
||||
// isValid = false;
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
// 所有数据合法,开始保存
|
||||
if (isValid) {
|
||||
@@ -890,10 +874,10 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
// 补齐并追加
|
||||
list.add(newCity);
|
||||
}
|
||||
controller.model
|
||||
.peopleList[
|
||||
index]['UTC'] =
|
||||
list[index].UTC;
|
||||
// controller.model
|
||||
// .peopleList[
|
||||
// index]['UTC'] =
|
||||
// list[index].UTC;
|
||||
controller.model
|
||||
.peopleList[
|
||||
index]
|
||||
@@ -952,14 +936,17 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
: "请选择城市".tr,
|
||||
style: TextStyle(
|
||||
color: getCityModel(
|
||||
index) !=
|
||||
null
|
||||
index) !=
|
||||
null &&
|
||||
getCityModel(
|
||||
index)!
|
||||
.id !=
|
||||
null
|
||||
? themeController
|
||||
.currentColor
|
||||
.sc3
|
||||
: themeController
|
||||
.currentColor
|
||||
.sc4,
|
||||
: Color(
|
||||
0xFF9EA4B7),
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
),
|
||||
@@ -981,6 +968,160 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
Container(
|
||||
height: 90.rpx,
|
||||
margin: EdgeInsets.only(
|
||||
left: 40.rpx,
|
||||
right: 35.rpx,
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// if (widget.status ==
|
||||
// BindType.share.code) {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: "被分享用户只能修改用户名称",
|
||||
// textColor:
|
||||
// themeController
|
||||
// .currentColor
|
||||
// .sc9);
|
||||
// return;
|
||||
// }
|
||||
FocusScope.of(context)
|
||||
.requestFocus(
|
||||
FocusNode());
|
||||
Future.delayed(
|
||||
Duration(
|
||||
milliseconds: 250),
|
||||
() {
|
||||
// 获取当前时区
|
||||
String? currentTimeZone;
|
||||
if (controller
|
||||
.model
|
||||
.peopleList
|
||||
.isNotEmpty &&
|
||||
index <
|
||||
controller
|
||||
.model
|
||||
.peopleList
|
||||
.length &&
|
||||
controller.model
|
||||
.peopleList[
|
||||
index]['UTC'] !=
|
||||
null) {
|
||||
currentTimeZone =
|
||||
controller.model
|
||||
.peopleList[
|
||||
index]['UTC'];
|
||||
}
|
||||
|
||||
showTimeMHTZonePickerDialog(
|
||||
context,
|
||||
title: "请选择时区".tr,
|
||||
initialTimeZone:
|
||||
currentTimeZone ?? "",
|
||||
onConfirm: (String
|
||||
selectedTimeZone) {
|
||||
controller.model
|
||||
.peopleList[
|
||||
index]['UTC'] =
|
||||
selectedTimeZone;
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'请选择时区'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
controller
|
||||
.model
|
||||
.peopleList
|
||||
.isNotEmpty &&
|
||||
index <
|
||||
controller
|
||||
.model
|
||||
.peopleList
|
||||
.length &&
|
||||
controller.model
|
||||
.peopleList[index]
|
||||
[
|
||||
'UTC'] !=
|
||||
null &&
|
||||
controller
|
||||
.model
|
||||
.peopleList[
|
||||
index]
|
||||
[
|
||||
'UTC']!
|
||||
.isNotEmpty
|
||||
? controller.model
|
||||
.peopleList[
|
||||
index]['UTC']!
|
||||
: "请选择时区".tr,
|
||||
style: TextStyle(
|
||||
color: controller
|
||||
.model
|
||||
.peopleList
|
||||
.isNotEmpty &&
|
||||
index <
|
||||
controller
|
||||
.model
|
||||
.peopleList
|
||||
.length &&
|
||||
controller.model
|
||||
.peopleList[index]
|
||||
[
|
||||
'UTC'] !=
|
||||
null &&
|
||||
controller
|
||||
.model
|
||||
.peopleList[
|
||||
index]
|
||||
[
|
||||
'UTC']!
|
||||
.isNotEmpty
|
||||
? themeController
|
||||
.currentColor
|
||||
.sc3
|
||||
: Color(
|
||||
0xFF9EA4B7),
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16.rpx),
|
||||
Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child:
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/expand_more.svg',
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
Container(
|
||||
height: 90.rpx,
|
||||
margin: EdgeInsets.only(
|
||||
|
||||
Reference in New Issue
Block a user