安卓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
+2 -35
View File
@@ -1,8 +1,6 @@
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';
class KRDialog extends StatelessWidget {
final String? title;
@@ -36,31 +34,6 @@ class KRDialog extends StatelessWidget {
Widget? icon,
Widget? customMessageWidget,
}) {
// 🔧 Android 15 诊断:记录对话框显示事件
print('📢 [KRDialog] ========== KRDialog.show() 被调用 ==========');
print('📢 [KRDialog] 标题: $title');
print('📢 [KRDialog] 消息: $message');
print('📢 [KRDialog] 当前时间: ${DateTime.now()}');
Future(() async {
try {
final dir = await getApplicationDocumentsDirectory();
final debugFile = File('${dir.path}/DIALOG_DEBUG.txt');
await debugFile.writeAsString(
'=' * 60 + '\n'
'📢 KRDialog.show() 被调用!\n'
'时间: ${DateTime.now()}\n'
'标题: $title\n'
'消息: $message\n'
'版本标识: Android15_Fix_v7_DialogFixed\n'
'=' * 60 + '\n',
mode: FileMode.append,
);
} catch (e) {
print('📢 [KRDialog] ❌ 写入对话框日志失败: $e');
}
});
return Get.dialog(
KRDialog(
title: title,
@@ -91,8 +64,7 @@ class KRDialog extends StatelessWidget {
),
child: TextButton(
onPressed: () {
print('📢 [KRDialog] 确认按钮被点击');
Get.back();
Get.back();
onConfirm?.call();
},
style: TextButton.styleFrom(
@@ -122,10 +94,6 @@ class KRDialog extends StatelessWidget {
final theme = Theme.of(context);
final isDark = theme.brightness == Brightness.dark;
print('📢 [KRDialog] 开始构建对话框 Widget');
print('📢 [KRDialog] 标题: $title');
print('📢 [KRDialog] 主题模式: ${isDark ? "暗色" : "亮色"}');
// 🔧 Android 15 关键修复:完全移除 ScreenUtil,使用固定像素值
return Dialog(
backgroundColor: theme.cardColor,
@@ -191,8 +159,7 @@ class KRDialog extends StatelessWidget {
),
child: TextButton(
onPressed: () {
print('📢 [KRDialog] 取消按钮被点击');
Get.back();
Get.back();
onCancel?.call();
},
style: TextButton.styleFrom(