安卓15部分机型出现界面不兼容并且UI库有BUG,MD
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (push) Has been cancelled
Build Windows / build (push) Has been cancelled
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Has been cancelled

(cherry picked from commit 010405edda74bdb0251dcff2e32482edae2c9976)
This commit is contained in:
2025-11-02 02:38:07 -08:00
committed by speakeloudest
parent 0ec2f72a93
commit 7a223d614b
7 changed files with 96 additions and 314 deletions
@@ -1,12 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'dart:io';
import 'package:path_provider/path_provider.dart';
import 'package:kaer_with_panels/app/routes/app_pages.dart';
import 'package:kaer_with_panels/app/utils/kr_subscribe_navigation_util.dart';
import '../../../widgets/kr_app_text_style.dart';
/// 订阅卡片组件
@@ -25,12 +21,6 @@ class KRSubscriptionCard extends StatelessWidget {
// 构建订阅卡片
Widget _kr_buildSubscriptionCard(BuildContext context) {
// 🔧 新增:订阅卡片渲染日志
print('🎴 [SubscriptionCard] 开始构建订阅卡片');
print('🎴 [SubscriptionCard] 卡片颜色: ${Theme.of(context).cardColor}');
print('🎴 [SubscriptionCard] 主题亮度: ${Theme.of(context).brightness}');
print('🎴 [SubscriptionCard] 文本颜色: ${Theme.of(context).textTheme.bodyMedium?.color}');
// 🔧 关键修复:完全移除 ScreenUtil,使用固定像素值避免缩放问题
return Container(
// 添加固定高度,确保卡片可见
@@ -82,36 +72,7 @@ class KRSubscriptionCard extends StatelessWidget {
height: 46,
child: ElevatedButton(
onPressed: () {
print('🎴 [SubscriptionCard] ========== 订阅按钮被点击 ==========');
print('🎴 [SubscriptionCard] 当前时间: ${DateTime.now()}');
print('🎴 [SubscriptionCard] 准备调用导航方法...');
// 🔧 关键修复:文件写入改为非阻塞,不影响主流程
Future(() async {
try {
final dir = await getApplicationDocumentsDirectory();
final debugFile = File('${dir.path}/SUBSCRIBE_BUTTON_DEBUG.txt');
await debugFile.writeAsString(
'=' * 60 + '\n'
'🎴 订阅按钮被点击!\n'
'时间: ${DateTime.now()}\n'
'版本标识: Android15_Fix_v6_Final\n'
'=' * 60 + '\n',
mode: FileMode.append,
);
print('🎴 [SubscriptionCard] ✅ 按钮点击日志已写入文件: ${debugFile.path}');
} catch (e) {
print('🎴 [SubscriptionCard] ❌ 写入按钮点击日志失败: $e');
}
});
try {
KRSubscribeNavigationUtil.navigateToPurchase(tag: 'SubscriptionCard');
print('🎴 [SubscriptionCard] 导航方法调用成功');
} catch (e, stackTrace) {
print('🎴 [SubscriptionCard] ❌ 导航方法调用失败: $e');
print('🎴 [SubscriptionCard] StackTrace: $stackTrace');
}
KRSubscribeNavigationUtil.navigateToPurchase(tag: 'SubscriptionCard');
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.blue,