diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart index e8cc2483..758f0237 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart @@ -54,7 +54,8 @@ class _SendElectronicKeyPageState extends State { } Widget indexChangeWidget() { - if (state.isSendSuccess.value == true && state.sendSucceedType.value.toString() == widget.type) { + if (state.isSendSuccess.value == true && + state.sendSucceedType.value.toString() == widget.type) { return sendElectronicKeySucceed(); } else { switch (int.parse(widget.type)) { @@ -163,7 +164,7 @@ class _SendElectronicKeyPageState extends State { Widget keyTimeWidget() { return Column( children: [ - CommonItem( + Obx(() => CommonItem( leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle: state.selectEffectiveDate.value, isHaveLine: true, @@ -177,8 +178,8 @@ class _SendElectronicKeyPageState extends State { state.selectEffectiveDate.value = XSDateUtils.formatDateTime( state.effectiveDateTime.value, 'yyyy-MM-dd HH:mm'); }); - }), - CommonItem( + })), + Obx(() => CommonItem( leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, rightTitle: state.selectFailureDate.value, isHaveDirection: true, @@ -191,7 +192,7 @@ class _SendElectronicKeyPageState extends State { state.selectFailureDate.value = XSDateUtils.formatDateTime( state.failureDateTime.value, 'yyyy-MM-dd HH:mm'); }); - }), + })), Container(height: 10.h), ], ); @@ -297,6 +298,7 @@ class _SendElectronicKeyPageState extends State { // logic.showToast("请完善信息"); // } logic.sendElectronicKeyRequest(); + setState(() {}); } else { //演示模式不获取接口 logic.showToast("演示模式"); @@ -517,7 +519,9 @@ class _SendElectronicKeyPageState extends State { // 远程开锁 Widget remoteUnlockingWidget() { return Visibility( - visible: isDemoMode ? false: (state.keyInfo.value.lockSetting!.remoteUnlock == 1 ? true : false), + visible: isDemoMode + ? false + : (state.keyInfo.value.lockSetting!.remoteUnlock == 1 ? true : false), child: Column( children: [ CommonItem(