Browse Source

refactor(settings/profile): 移除未使用的测试和清理缓存代码

清理不再使用的opus解码测试和缓存清理功能代码,保持代码整洁
weicu
lxm 1 year ago
parent
commit
0b88fdfe62
  1. 132
      lib/modules/profile/views/profile_view.dart
  2. 42
      lib/modules/settings/views/settings_view.dart

132
lib/modules/profile/views/profile_view.dart

@ -740,72 +740,72 @@ class EditProfileView extends GetView<ProfileController> {
}, },
isDarkMode: isDarkMode, isDarkMode: isDarkMode,
), ),
Divider( // Divider(
height: 1, // height: 1,
color: isDarkMode // color: isDarkMode
? Colors.white.withOpacity(0.1) // ? Colors.white.withOpacity(0.1)
: Colors.grey[200]), // : Colors.grey[200]),
// 清理缓存 // // 清理缓存
_buildSimpleNavigationSetting( // _buildSimpleNavigationSetting(
title: 'clean'.tr, // 清理缓存 // title: 'clean'.tr, // 清理缓存
icon: Icons.logout, // icon: Icons.logout,
iconBgColor: isDarkMode // iconBgColor: isDarkMode
? Colors.red[900]!.withOpacity(0.3) // ? Colors.red[900]!.withOpacity(0.3)
: Colors.red[50]!, // : Colors.red[50]!,
iconColor: isDarkMode ? Colors.red[300]! : Colors.red[600]!, // iconColor: isDarkMode ? Colors.red[300]! : Colors.red[600]!,
titleColor: // titleColor:
isDarkMode ? Colors.red[300]! : Colors.red[600]!, // isDarkMode ? Colors.red[300]! : Colors.red[600]!,
onTap: () { // onTap: () {
// 退出登录确认对话框 // // 退出登录确认对话框
Get.dialog( // Get.dialog(
AlertDialog( // AlertDialog(
backgroundColor: // backgroundColor:
isDarkMode ? Colors.grey[900] : Colors.white, // isDarkMode ? Colors.grey[900] : Colors.white,
title: Text( // title: Text(
'clean'.tr, // 清理缓存 // 'clean'.tr, // 清理缓存
style: TextStyle( // style: TextStyle(
color: isDarkMode ? Colors.white : Colors.black87, // color: isDarkMode ? Colors.white : Colors.black87,
), // ),
), // ),
content: Text( // content: Text(
'cleanTips'.tr, // 确定要退出当前账号吗? // 'cleanTips'.tr, // 确定要退出当前账号吗?
style: TextStyle( // style: TextStyle(
color: // color:
isDarkMode ? Colors.white70 : Colors.black54, // isDarkMode ? Colors.white70 : Colors.black54,
), // ),
), // ),
actions: [ // actions: [
TextButton( // TextButton(
onPressed: () => Get.back(), // onPressed: () => Get.back(),
child: Text( // child: Text(
'cancel'.tr, // 取消 // 'cancel'.tr, // 取消
style: TextStyle( // style: TextStyle(
color: isDarkMode // color: isDarkMode
? Colors.white70 // ? Colors.white70
: Colors.black54, // : Colors.black54,
), // ),
), // ),
), // ),
TextButton( // TextButton(
onPressed: () { // onPressed: () {
Get.back(); // Get.back();
controller.clean(); // controller.clean();
}, // },
child: Text( // child: Text(
'confirm'.tr, // 确定 // 'confirm'.tr, // 确定
style: TextStyle( // style: TextStyle(
color: isDarkMode // color: isDarkMode
? Colors.red[300] // ? Colors.red[300]
: Colors.red[600], // : Colors.red[600],
), // ),
), // ),
), // ),
], // ],
), // ),
); // );
}, // },
isDarkMode: isDarkMode, // isDarkMode: isDarkMode,
), // ),
Divider( Divider(
height: 1, height: 1,
color: isDarkMode color: isDarkMode

42
lib/modules/settings/views/settings_view.dart

@ -521,27 +521,27 @@ class SettingsView extends GetView<SettingsController> {
// ? Colors.white.withOpacity(0.1) // ? Colors.white.withOpacity(0.1)
// : Colors.grey[200]), // : Colors.grey[200]),
// BLE测试 // BLE测试
_buildSimpleNavigationSetting( // _buildSimpleNavigationSetting(
title: 'opus解码测试', // title: 'opus解码测试',
subtitle: '测试opus解码', // subtitle: '测试opus解码',
icon: Icons.bluetooth_searching, // icon: Icons.bluetooth_searching,
iconBgColor: isDarkMode // iconBgColor: isDarkMode
? Colors.green[900]!.withOpacity(0.3) // ? Colors.green[900]!.withOpacity(0.3)
: Colors.green[100]!, // : Colors.green[100]!,
iconColor: // iconColor:
isDarkMode ? Colors.green[300]! : Colors.green[600]!, // isDarkMode ? Colors.green[300]! : Colors.green[600]!,
titleColor: isDarkMode ? Colors.white : null, // titleColor: isDarkMode ? Colors.white : null,
subtitleColor: isDarkMode ? Colors.white70 : null, // subtitleColor: isDarkMode ? Colors.white70 : null,
onTap: () { // onTap: () {
Get.toNamed(Routes.opusTest); // Get.toNamed(Routes.opusTest);
}, // },
isDarkMode: isDarkMode, // isDarkMode: isDarkMode,
), // ),
Divider( // Divider(
height: 1, // height: 1,
color: isDarkMode // color: isDarkMode
? Colors.white.withOpacity(0.1) // ? Colors.white.withOpacity(0.1)
: Colors.grey[200]), // : Colors.grey[200]),
// BLE测试 // BLE测试
// _buildSimpleNavigationSetting( // _buildSimpleNavigationSetting(

Loading…
Cancel
Save