多语言
This commit is contained in:
@@ -89,7 +89,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
i < controller.model.peopleList.length;
|
||||
i++) {
|
||||
var d = controller.model.peopleList[i];
|
||||
String prefix = "人员信息${i == 0 ? "A" : "B"}:";
|
||||
// String prefix = "人员信息${i == 0 ? "A" : "B"}:";
|
||||
|
||||
if (d['height'] != null &&
|
||||
d['height'].toString().isNotEmpty &&
|
||||
@@ -211,17 +211,18 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 18.rpx,
|
||||
top: index == 0 ? 30.rpx : 90.rpx,
|
||||
bottom: 20.rpx),
|
||||
child: Text(
|
||||
"人员资料${index == 0 ? "A" : "B"}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx),
|
||||
),
|
||||
),
|
||||
margin: EdgeInsets.only(
|
||||
left: 18.rpx,
|
||||
top: index == 0 ? 30.rpx : 90.rpx,
|
||||
bottom: 20.rpx),
|
||||
child: Text(
|
||||
index == 0
|
||||
? 'person_info_A'.tr
|
||||
: 'person_info_B'.tr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx),
|
||||
)),
|
||||
Container(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -242,7 +243,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'姓名',
|
||||
'姓名'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -262,23 +263,20 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
fontSize: 30.rpx,
|
||||
color:
|
||||
Colors.white),
|
||||
decoration:
|
||||
const InputDecoration(
|
||||
fillColor: Colors
|
||||
.transparent,
|
||||
filled: true,
|
||||
hintText:
|
||||
"请输入姓名",
|
||||
hintStyle: TextStyle(
|
||||
color: Colors
|
||||
.white),
|
||||
border:
|
||||
InputBorder
|
||||
.none,
|
||||
contentPadding:
|
||||
EdgeInsets
|
||||
.all(
|
||||
0)),
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors
|
||||
.transparent,
|
||||
filled: true,
|
||||
hintText:
|
||||
"请输入姓名".tr,
|
||||
hintStyle: TextStyle(
|
||||
color: Colors
|
||||
.white),
|
||||
border: InputBorder
|
||||
.none,
|
||||
contentPadding:
|
||||
EdgeInsets.all(
|
||||
0)),
|
||||
onChanged: (value) {
|
||||
controller.model
|
||||
.peopleList[
|
||||
@@ -321,7 +319,8 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
() {
|
||||
showOneSelectionDialog(
|
||||
context,
|
||||
arr: ["女", "男"],
|
||||
title: "选择性别".tr,
|
||||
arr: ["女".tr, "男".tr],
|
||||
checkIndex: controller
|
||||
.model
|
||||
.peopleList[
|
||||
@@ -349,7 +348,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'性别',
|
||||
'性别'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -371,8 +370,8 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
[
|
||||
'gender'] ==
|
||||
0
|
||||
? '女'
|
||||
: '男',
|
||||
? '女'.tr
|
||||
: '男'.tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.right,
|
||||
@@ -429,6 +428,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
milliseconds: 250), () {
|
||||
showHeightPickerDialog(
|
||||
context,
|
||||
title: "选择身高".tr,
|
||||
initialHeight:
|
||||
initialHeight,
|
||||
onConfirm:
|
||||
@@ -459,7 +459,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'身高(cm)',
|
||||
'身高(cm)'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -515,6 +515,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
() {
|
||||
showWeightPickerDialog(
|
||||
context,
|
||||
title: "选择体重".tr,
|
||||
initialWeight: controller
|
||||
.model
|
||||
.peopleList[
|
||||
@@ -547,7 +548,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'体重(kg)',
|
||||
'体重(kg)'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -606,6 +607,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
() {
|
||||
showDateSelectionDialog(
|
||||
context,
|
||||
title: "选择生日".tr,
|
||||
checkDate: controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
@@ -642,7 +644,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'生日',
|
||||
'生日'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -662,15 +664,14 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
minWidth:
|
||||
200.rpx),
|
||||
child: Text(
|
||||
controller.model.peopleList[index]
|
||||
[
|
||||
'birthday'] !=
|
||||
controller.model.peopleList[index]['birthday'] !=
|
||||
null
|
||||
? time_08_Formatter_pattern(
|
||||
controller
|
||||
.model
|
||||
.peopleList[index]['birthday'],
|
||||
"yyyy年MM月dd日")
|
||||
controller.model.peopleList[index]
|
||||
[
|
||||
'birthday'],
|
||||
"yyyy年MM月dd日"
|
||||
.tr)
|
||||
: '',
|
||||
textAlign:
|
||||
TextAlign
|
||||
@@ -721,7 +722,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'联系方式',
|
||||
'联系方式'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
@@ -746,7 +747,8 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
fillColor: Colors
|
||||
.transparent,
|
||||
filled: true,
|
||||
hintText: "请输入联系方式",
|
||||
hintText:
|
||||
"请输入联系方式".tr,
|
||||
hintStyle: TextStyle(
|
||||
color:
|
||||
Colors.white),
|
||||
@@ -814,6 +816,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
||||
|
||||
Future<void> getPersonData() async {
|
||||
PeopleInfoController peopleInfoController = Get.find();
|
||||
await peopleInfoController.getPeoples(Get.arguments['mac']); // 控制器创建时立即执行
|
||||
await peopleInfoController
|
||||
.getPeoples(Get.arguments['mac'.tr]); // 控制器创建时立即执行
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user