多语言
This commit is contained in:
@@ -23,7 +23,7 @@ class RxhxMht extends StatefulWidget {
|
||||
class _RxhxMhtState extends State<RxhxMht> {
|
||||
get controller => Get.find<SleepingHabitController>();
|
||||
get bedController => Get.find<BedController>();
|
||||
List location = ["床垫全局", "床垫左侧", "床垫右侧"];
|
||||
List location = ["床垫全局".tr, "床垫左侧".tr, "床垫右侧".tr];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -175,7 +175,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
);
|
||||
}
|
||||
|
||||
List weeks = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
|
||||
List weeks = ["周一".tr, "周二".tr, "周三".tr, "周四".tr, "周五".tr, "周六".tr, "周日".tr];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -204,7 +204,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'柔性唤醒',
|
||||
'柔性唤醒'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@@ -242,7 +242,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'柔性唤醒功能',
|
||||
'柔性唤醒功能'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -301,7 +301,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
onTap: () async {
|
||||
showDayTimeSelectionDialog(context,
|
||||
dayTimeArr: controller.model.rxhxWakeTime,
|
||||
title: "唤醒时间", checkChange: (d) {
|
||||
title: "唤醒时间".tr, checkChange: (d) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxWakeTime = [
|
||||
int.parse("${d[0]}"),
|
||||
@@ -321,7 +321,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'唤醒时间',
|
||||
'唤醒时间'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -362,9 +362,9 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
onTap: () {
|
||||
showOneSelectionDialog(
|
||||
context,
|
||||
arr: ['开', "关"],
|
||||
arr: ['开'.tr, "关".tr],
|
||||
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
|
||||
title: "按摩",
|
||||
title: "按摩".tr,
|
||||
checkChange: (index) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxIsAnMo =
|
||||
@@ -383,7 +383,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'按摩',
|
||||
'按摩'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -395,7 +395,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
controller.model.rxhxIsAnMo ? '开' : '关',
|
||||
controller.model.rxhxIsAnMo ? '开'.tr : '关'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -425,7 +425,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
context,
|
||||
arr: location,
|
||||
checkIndex: controller.model.rxhxLocation,
|
||||
title: "唤醒部位",
|
||||
title: "唤醒部位".tr,
|
||||
checkChange: (index) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxLocation = index;
|
||||
@@ -443,7 +443,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'唤醒部位',
|
||||
'唤醒部位'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -493,7 +493,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'自定义',
|
||||
'自定义'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -622,7 +622,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
width: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Text(
|
||||
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
|
||||
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
@@ -652,7 +652,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text("完成",
|
||||
child: Text("完成".tr,
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF003058),
|
||||
fontSize: 26.rpx)),
|
||||
|
||||
Reference in New Issue
Block a user