|
|
@ -45,8 +45,8 @@ class SettingsView extends GetView<SettingsController> { |
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), |
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), |
|
|
children: [ |
|
|
children: [ |
|
|
_buildUserInfoCard(isDarkMode), |
|
|
_buildUserInfoCard(isDarkMode), |
|
|
SizedBox(height: 20.h), |
|
|
// SizedBox(height: 20.h), |
|
|
_buildAISettingsSection(isDarkMode), |
|
|
// _buildAISettingsSection(isDarkMode), |
|
|
SizedBox(height: 20.h), |
|
|
SizedBox(height: 20.h), |
|
|
_buildSystemSettingsSection(isDarkMode), |
|
|
_buildSystemSettingsSection(isDarkMode), |
|
|
SizedBox(height: 20.h), |
|
|
SizedBox(height: 20.h), |
|
|
@ -505,9 +505,9 @@ class SettingsView extends GetView<SettingsController> { |
|
|
|
|
|
|
|
|
// 清除配对设备 |
|
|
// 清除配对设备 |
|
|
_buildSimpleNavigationSetting( |
|
|
_buildSimpleNavigationSetting( |
|
|
title: '设备管理', |
|
|
title: 'deviceManagement'.tr, // 设备管理 |
|
|
subtitle: '设备管理列表', |
|
|
subtitle: 'deviceManagementInfo'.tr, // 设备管理列表 |
|
|
icon: Icons.bluetooth_disabled, |
|
|
icon: Icons.settings_bluetooth, |
|
|
iconBgColor: isDarkMode |
|
|
iconBgColor: isDarkMode |
|
|
? Colors.red[900]!.withOpacity(0.3) |
|
|
? Colors.red[900]!.withOpacity(0.3) |
|
|
: Colors.red[100]!, |
|
|
: Colors.red[100]!, |
|
|
@ -633,8 +633,8 @@ class SettingsView extends GetView<SettingsController> { |
|
|
// : Colors.grey[200]), |
|
|
// : Colors.grey[200]), |
|
|
// 测试ble耳机固件版本升级 |
|
|
// 测试ble耳机固件版本升级 |
|
|
_buildSimpleNavigationSetting( |
|
|
_buildSimpleNavigationSetting( |
|
|
title: 'ota升级', |
|
|
title: '固件升级'.tr, |
|
|
subtitle: '测试ble耳机固件版本升级', |
|
|
subtitle: 'ble耳机固件版本升级'.tr, |
|
|
icon: Icons.system_update_alt, |
|
|
icon: Icons.system_update_alt, |
|
|
iconBgColor: isDarkMode |
|
|
iconBgColor: isDarkMode |
|
|
? Colors.orange[900]!.withOpacity(0.3) |
|
|
? Colors.orange[900]!.withOpacity(0.3) |
|
|
@ -660,140 +660,6 @@ class SettingsView extends GetView<SettingsController> { |
|
|
Get.toNamed(Routes.permissions); |
|
|
Get.toNamed(Routes.permissions); |
|
|
}, |
|
|
}, |
|
|
), |
|
|
), |
|
|
Divider( |
|
|
|
|
|
height: 1, |
|
|
|
|
|
color: isDarkMode |
|
|
|
|
|
? Colors.white.withOpacity(0.1) |
|
|
|
|
|
: Colors.grey[200]), |
|
|
|
|
|
|
|
|
|
|
|
// 退出登录 |
|
|
|
|
|
// _buildSimpleNavigationSetting( |
|
|
|
|
|
// title: 'logout'.tr, // 退出登录 |
|
|
|
|
|
// icon: Icons.logout, |
|
|
|
|
|
// iconBgColor: isDarkMode |
|
|
|
|
|
// ? Colors.red[900]!.withOpacity(0.3) |
|
|
|
|
|
// : Colors.red[50]!, |
|
|
|
|
|
// iconColor: isDarkMode ? Colors.red[300]! : Colors.red[600]!, |
|
|
|
|
|
// titleColor: |
|
|
|
|
|
// isDarkMode ? Colors.red[300]! : Colors.red[600]!, |
|
|
|
|
|
// onTap: () { |
|
|
|
|
|
// // 退出登录确认对话框 |
|
|
|
|
|
// Get.dialog( |
|
|
|
|
|
// AlertDialog( |
|
|
|
|
|
// backgroundColor: |
|
|
|
|
|
// isDarkMode ? Colors.grey[900] : Colors.white, |
|
|
|
|
|
// title: Text( |
|
|
|
|
|
// 'logout'.tr, // 退出登录 |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// color: isDarkMode ? Colors.white : Colors.black87, |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// content: Text( |
|
|
|
|
|
// 'logoutTips'.tr, // 确定要退出当前账号吗? |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// color: |
|
|
|
|
|
// isDarkMode ? Colors.white70 : Colors.black54, |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// actions: [ |
|
|
|
|
|
// TextButton( |
|
|
|
|
|
// onPressed: () => Get.back(), |
|
|
|
|
|
// child: Text( |
|
|
|
|
|
// 'cancel'.tr, // 取消 |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// color: isDarkMode |
|
|
|
|
|
// ? Colors.white70 |
|
|
|
|
|
// : Colors.black54, |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// TextButton( |
|
|
|
|
|
// onPressed: () { |
|
|
|
|
|
// Get.back(); |
|
|
|
|
|
// controller.signOut(); |
|
|
|
|
|
// }, |
|
|
|
|
|
// child: Text( |
|
|
|
|
|
// 'confirm'.tr, // 确定 |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// color: isDarkMode |
|
|
|
|
|
// ? Colors.red[300] |
|
|
|
|
|
// : Colors.red[600], |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// ], |
|
|
|
|
|
// ), |
|
|
|
|
|
// ); |
|
|
|
|
|
// }, |
|
|
|
|
|
// isDarkMode: isDarkMode, |
|
|
|
|
|
// ), |
|
|
|
|
|
// Divider( |
|
|
|
|
|
// height: 1, |
|
|
|
|
|
// color: isDarkMode |
|
|
|
|
|
// ? Colors.white.withOpacity(0.1) |
|
|
|
|
|
// : Colors.grey[200]), |
|
|
|
|
|
|
|
|
|
|
|
// 注销账号 |
|
|
|
|
|
// _buildSimpleNavigationSetting( |
|
|
|
|
|
// title: 'deleteAccount'.tr, // 注销账号 |
|
|
|
|
|
// icon: Icons.delete_forever, |
|
|
|
|
|
// iconBgColor: isDarkMode |
|
|
|
|
|
// ? Colors.red[900]!.withOpacity(0.3) |
|
|
|
|
|
// : Colors.red[50]!, |
|
|
|
|
|
// iconColor: isDarkMode ? Colors.red[300]! : Colors.red[600]!, |
|
|
|
|
|
// titleColor: |
|
|
|
|
|
// isDarkMode ? Colors.red[300]! : Colors.red[600]!, |
|
|
|
|
|
// onTap: () { |
|
|
|
|
|
// // 注销账号确认对话框 |
|
|
|
|
|
// Get.dialog( |
|
|
|
|
|
// AlertDialog( |
|
|
|
|
|
// backgroundColor: |
|
|
|
|
|
// isDarkMode ? Colors.grey[900] : Colors.white, |
|
|
|
|
|
// title: Text( |
|
|
|
|
|
// 'deleteAccount'.tr, // 注销账号 |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// color: isDarkMode ? Colors.white : Colors.black87, |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// content: Text( |
|
|
|
|
|
// 'deleteAccountTips'.tr, // 确定要永久删除您的账号吗?此操作不可撤销 |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// color: |
|
|
|
|
|
// isDarkMode ? Colors.white70 : Colors.black54, |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// actions: [ |
|
|
|
|
|
// TextButton( |
|
|
|
|
|
// onPressed: () => Get.back(), |
|
|
|
|
|
// child: Text( |
|
|
|
|
|
// 'cancel'.tr, // 取消 |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// color: isDarkMode |
|
|
|
|
|
// ? Colors.white70 |
|
|
|
|
|
// : Colors.black54, |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// TextButton( |
|
|
|
|
|
// onPressed: () { |
|
|
|
|
|
// Get.back(); |
|
|
|
|
|
// controller.deleteAccount(); |
|
|
|
|
|
// }, |
|
|
|
|
|
// child: Text( |
|
|
|
|
|
// 'confirm'.tr, // 确定 |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// color: isDarkMode |
|
|
|
|
|
// ? Colors.red[300] |
|
|
|
|
|
// : Colors.red[600], |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
// ], |
|
|
|
|
|
// ), |
|
|
|
|
|
// ); |
|
|
|
|
|
// }, |
|
|
|
|
|
// isDarkMode: isDarkMode, |
|
|
|
|
|
// ), |
|
|
|
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
@ -873,7 +739,7 @@ class SettingsView extends GetView<SettingsController> { |
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
children: [ |
|
|
children: [ |
|
|
Text( |
|
|
Text( |
|
|
'DeepSound', |
|
|
'DeapSound', |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
fontSize: 16.sp, |
|
|
fontSize: 16.sp, |
|
|
fontWeight: FontWeight.w500, |
|
|
fontWeight: FontWeight.w500, |
|
|
|