|
|
@ -158,7 +158,10 @@ class EditProfileView extends GetView<ProfileController> { |
|
|
size: 20.sp, |
|
|
size: 20.sp, |
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
), |
|
|
), |
|
|
onPressed: () => Get.back(), |
|
|
onPressed: () { |
|
|
|
|
|
controller.forceRollbackIfUnsaved(); |
|
|
|
|
|
Get.back(); |
|
|
|
|
|
}, |
|
|
), |
|
|
), |
|
|
// title: Text( |
|
|
// title: Text( |
|
|
// 'editProfile'.tr, |
|
|
// 'editProfile'.tr, |
|
|
@ -214,15 +217,23 @@ class EditProfileView extends GetView<ProfileController> { |
|
|
)) |
|
|
)) |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
body: Padding( |
|
|
// ignore: deprecated_member_use |
|
|
|
|
|
body: WillPopScope( |
|
|
|
|
|
onWillPop: () async { |
|
|
|
|
|
ProfileController.to.forceRollbackIfUnsaved(); |
|
|
|
|
|
return true; |
|
|
|
|
|
}, |
|
|
|
|
|
child: Padding( |
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), |
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), |
|
|
child: |
|
|
child: Column( |
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ |
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
_buildEditProfileSection(context, isDarkMode, nameController), |
|
|
children: [ |
|
|
|
|
|
_buildEditProfileSection( |
|
|
|
|
|
context, isDarkMode, nameController), |
|
|
SizedBox(height: 16.h), |
|
|
SizedBox(height: 16.h), |
|
|
_buildAccountSettings(isDarkMode), |
|
|
_buildAccountSettings(isDarkMode), |
|
|
SizedBox(height: 16.h), |
|
|
SizedBox(height: 16.h), |
|
|
]))); |
|
|
])))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 新增:构建编辑资料区域的方法 |
|
|
// 新增:构建编辑资料区域的方法 |
|
|
|