更新控制跳转
This commit is contained in:
@@ -39,7 +39,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
peopleList.add({
|
||||
'mac': device?.macA,
|
||||
'gender': "男",
|
||||
'id':device!.macAID,
|
||||
'id': device!.macAID,
|
||||
});
|
||||
|
||||
// Initialize person B if exists
|
||||
@@ -47,7 +47,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
peopleList.add({
|
||||
'mac': device.macB,
|
||||
'gender': "男",
|
||||
'id':device!.macBID,
|
||||
'id': device!.macBID,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
? DateFormat('yyyy-MM-dd').format(personData['birthday'])
|
||||
: personData['birthday'],
|
||||
'contact': personData['contact'],
|
||||
'id':personData['id'],
|
||||
'id': personData['id'],
|
||||
};
|
||||
await requestWithLog(
|
||||
logTitle: "保存用户信息",
|
||||
@@ -124,7 +124,8 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
print(res);
|
||||
},
|
||||
onFailure: (res) {
|
||||
TopSlideNotification.show(context,text: res.msg!,textColor: themeController.currentColor.sc9);
|
||||
TopSlideNotification.show(context,
|
||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
||||
print(res);
|
||||
},
|
||||
);
|
||||
@@ -306,42 +307,42 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
decoration: BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'性别',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context)
|
||||
.requestFocus(FocusNode());
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showOneSelectionDialog(context,
|
||||
arr: ["女", "男"],
|
||||
checkIndex: peopleList[index]
|
||||
['gender'] ==
|
||||
"女"
|
||||
? 0
|
||||
: 1, checkChange: (sindex) {
|
||||
setState(() {
|
||||
peopleList[index]['gender'] =
|
||||
sindex == 0 ? "女" : "男";
|
||||
});
|
||||
}).then((d) {});
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context)
|
||||
.requestFocus(FocusNode());
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showOneSelectionDialog(context,
|
||||
arr: ["女", "男"],
|
||||
checkIndex: peopleList[index]
|
||||
['gender'] ==
|
||||
"女"
|
||||
? 0
|
||||
: 1, checkChange: (sindex) {
|
||||
setState(() {
|
||||
peopleList[index]['gender'] =
|
||||
sindex == 0 ? "女" : "男";
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
}).then((d) {});
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'性别',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
@@ -365,8 +366,8 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
@@ -376,43 +377,42 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
margin: EdgeInsets.only(
|
||||
left: 40.rpx, right: 35.rpx),
|
||||
decoration: BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'身高(cm)',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showHeightPickerDialog(
|
||||
context,
|
||||
initialHeight: int.tryParse(
|
||||
peopleList[index]['height'] ??
|
||||
'170') ??
|
||||
170,
|
||||
onConfirm: (int selectedHeight) {
|
||||
setState(() {
|
||||
peopleList[index]['height'] =
|
||||
selectedHeight.toString();
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'身高(cm)',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showHeightPickerDialog(
|
||||
context,
|
||||
initialHeight: int.tryParse(
|
||||
peopleList[index]
|
||||
['height'] ??
|
||||
'170') ??
|
||||
170,
|
||||
onConfirm: (int selectedHeight) {
|
||||
setState(() {
|
||||
peopleList[index]['height'] =
|
||||
selectedHeight.toString();
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
peopleList[index]['height'] !=
|
||||
@@ -431,8 +431,8 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
size: 48.rpx),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
@@ -442,39 +442,39 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
margin: EdgeInsets.only(
|
||||
left: 40.rpx, right: 35.rpx),
|
||||
decoration: BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'体重(kg)',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showWeightPickerDialog(
|
||||
context,
|
||||
initialWeight: "0",
|
||||
onConfirm: (int selectedWeight) {
|
||||
setState(() {
|
||||
peopleList[index]['weight'] =
|
||||
selectedWeight.toString();
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'体重(kg)',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showWeightPickerDialog(
|
||||
context,
|
||||
initialWeight: "0",
|
||||
onConfirm: (int selectedWeight) {
|
||||
setState(() {
|
||||
peopleList[index]['weight'] =
|
||||
selectedWeight.toString();
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
peopleList[index]['weight'] !=
|
||||
@@ -493,8 +493,8 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
size: 48.rpx),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
@@ -504,46 +504,44 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
margin: EdgeInsets.only(
|
||||
left: 40.rpx, right: 35.rpx),
|
||||
decoration: BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'生日',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context)
|
||||
.requestFocus(FocusNode());
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showDateSelectionDialog(context,
|
||||
checkDate: peopleList[index]
|
||||
['birthday'] is DateTime
|
||||
? peopleList[index]
|
||||
['birthday']
|
||||
: DateTime.tryParse(
|
||||
peopleList[index][
|
||||
'birthday'] ??
|
||||
'') ??
|
||||
DateTime.now(),
|
||||
checkChange: (DateTime d) {
|
||||
setState(() {
|
||||
peopleList[index]['birthday'] =
|
||||
d;
|
||||
});
|
||||
}).then((d) {});
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context)
|
||||
.requestFocus(FocusNode());
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showDateSelectionDialog(context,
|
||||
checkDate: peopleList[index]
|
||||
['birthday'] is DateTime
|
||||
? peopleList[index]['birthday']
|
||||
: DateTime.tryParse(
|
||||
peopleList[index]
|
||||
['birthday'] ??
|
||||
'') ??
|
||||
DateTime.now(),
|
||||
checkChange: (DateTime d) {
|
||||
setState(() {
|
||||
peopleList[index]['birthday'] = d;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
}).then((d) {});
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'生日',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
@@ -574,8 +572,8 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
|
||||
Reference in New Issue
Block a user