|
|
|
@ -657,18 +657,19 @@ class SettingsView extends GetView<SettingsController> { |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
child: ClipRRect( |
|
|
|
borderRadius: BorderRadius.circular(16.r), |
|
|
|
child: BackdropFilter( |
|
|
|
filter: isDarkMode |
|
|
|
? ImageFilter.blur(sigmaX: 5, sigmaY: 5) |
|
|
|
: ImageFilter.blur(sigmaX: 0, sigmaY: 0), |
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
// 左侧应用信息区域 - 使用固定宽度 |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
clipBehavior: Clip.antiAlias, |
|
|
|
child: BackdropFilter( |
|
|
|
filter: isDarkMode |
|
|
|
? ImageFilter.blur(sigmaX: 5, sigmaY: 5) |
|
|
|
: ImageFilter.blur(sigmaX: 0, sigmaY: 0), |
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
// 左侧应用信息区域 - 使用固定宽度 |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
GestureDetector( |
|
|
|
onTap: controller.handleSecretTap, // 点击事件 |
|
|
|
child: Container( |
|
|
|
width: 40.w, |
|
|
|
height: 40.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -690,82 +691,82 @@ class SettingsView extends GetView<SettingsController> { |
|
|
|
color: Colors.white, |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 12.w), |
|
|
|
Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
'Voitrans', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.sp, |
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
color: isDarkMode ? Colors.white : Colors.black87, |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 12.w), |
|
|
|
Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
'Voitrans', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.sp, |
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
color: isDarkMode ? Colors.white : Colors.black87, |
|
|
|
), |
|
|
|
SizedBox(height: 2.h), |
|
|
|
Obx(() => Text( |
|
|
|
// 如果版本信息为空,显示加载中 |
|
|
|
controller.appVersion.value.isEmpty |
|
|
|
? '${'versions'.tr} ${'loading'.tr}' // 版本 加载中 |
|
|
|
: '${'versions'.tr} ${controller.appVersion.value} (Build ${controller.buildNumber.value})', // 版本号 |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.sp, |
|
|
|
color: isDarkMode |
|
|
|
? Colors.white70 |
|
|
|
: Colors.black54, |
|
|
|
), |
|
|
|
)), |
|
|
|
], |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
|
|
|
|
// 间距 |
|
|
|
SizedBox(width: 16.w), |
|
|
|
|
|
|
|
// 右侧检查更新按钮 - 使用Expanded确保充分利用剩余空间 |
|
|
|
Expanded( |
|
|
|
child: InkWell( |
|
|
|
onTap: () { |
|
|
|
// 调用检查更新方法 |
|
|
|
controller.checkForUpdate(); |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
constraints: BoxConstraints( |
|
|
|
minHeight: 36.h, // 设置最小高度而不是宽度约束 |
|
|
|
), |
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
horizontal: 12.w, |
|
|
|
vertical: 8.h, |
|
|
|
), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode |
|
|
|
? Colors.blue[900]!.withOpacity(0.3) |
|
|
|
: Colors.blue[100], |
|
|
|
borderRadius: BorderRadius.circular(16.r), |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: FittedBox( |
|
|
|
fit: BoxFit.scaleDown, // 如果文本过长,自动缩小字体 |
|
|
|
child: Text( |
|
|
|
'checkUpdates'.tr, // 检查更新 |
|
|
|
SizedBox(height: 2.h), |
|
|
|
Obx(() => Text( |
|
|
|
// 如果版本信息为空,显示加载中 |
|
|
|
controller.appVersion.value.isEmpty |
|
|
|
? '${'versions'.tr} ${'loading'.tr}' // 版本 加载中 |
|
|
|
: '${'versions'.tr} ${controller.appVersion.value} (Build ${controller.buildNumber.value})', // 版本号 |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.sp, |
|
|
|
color: isDarkMode |
|
|
|
? Colors.blue[300] |
|
|
|
: Colors.blue[600], |
|
|
|
height: 1.2, // 稍微减少行高,适应FittedBox |
|
|
|
? Colors.white70 |
|
|
|
: Colors.black54, |
|
|
|
), |
|
|
|
textAlign: TextAlign.center, |
|
|
|
maxLines: 2, // 最多显示2行,配合FittedBox使用 |
|
|
|
)), |
|
|
|
], |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
|
|
|
|
// 间距 |
|
|
|
SizedBox(width: 16.w), |
|
|
|
|
|
|
|
// 右侧检查更新按钮 - 使用Expanded确保充分利用剩余空间 |
|
|
|
Expanded( |
|
|
|
child: InkWell( |
|
|
|
onTap: () { |
|
|
|
// 调用检查更新方法 |
|
|
|
controller.checkForUpdate(); |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
constraints: BoxConstraints( |
|
|
|
minHeight: 36.h, // 设置最小高度而不是宽度约束 |
|
|
|
), |
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
horizontal: 12.w, |
|
|
|
vertical: 8.h, |
|
|
|
), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode |
|
|
|
? Colors.blue[900]!.withOpacity(0.3) |
|
|
|
: Colors.blue[100], |
|
|
|
borderRadius: BorderRadius.circular(16.r), |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: FittedBox( |
|
|
|
fit: BoxFit.scaleDown, // 如果文本过长,自动缩小字体 |
|
|
|
child: Text( |
|
|
|
'checkUpdates'.tr, // 检查更新 |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.sp, |
|
|
|
color: isDarkMode |
|
|
|
? Colors.blue[300] |
|
|
|
: Colors.blue[600], |
|
|
|
height: 1.2, // 稍微减少行高,适应FittedBox |
|
|
|
), |
|
|
|
textAlign: TextAlign.center, |
|
|
|
maxLines: 2, // 最多显示2行,配合FittedBox使用 |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
@ -793,7 +794,7 @@ class SettingsView extends GetView<SettingsController> { |
|
|
|
Get.locale?.countryCode == 'CN') |
|
|
|
InkWell( |
|
|
|
onTap: () => Get.to( |
|
|
|
() => WebViewPage( |
|
|
|
() => const WebViewPage( |
|
|
|
url: 'https://beian.miit.gov.cn', |
|
|
|
title: 'ICP备案信息', |
|
|
|
), |
|
|
|
@ -809,6 +810,39 @@ class SettingsView extends GetView<SettingsController> { |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
// 隐藏的调试信息 |
|
|
|
Obx(() => controller.showDebugInfo.value |
|
|
|
? Container( |
|
|
|
margin: EdgeInsets.only(top: 12.h), |
|
|
|
padding: EdgeInsets.all(12.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode ? Colors.grey[800] : Colors.grey[100], |
|
|
|
borderRadius: BorderRadius.circular(8.r), |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
'版本服务调试信息', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.sp, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
color: isDarkMode ? Colors.white : Colors.black, |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(height: 8.h), |
|
|
|
Text( |
|
|
|
controller.getSomeAppData(), |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 10.sp, |
|
|
|
fontFamily: 'monospace', |
|
|
|
color: isDarkMode ? Colors.white70 : Colors.black87, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
: const SizedBox.shrink()), |
|
|
|
], |
|
|
|
); |
|
|
|
} |
|
|
|
|