新增日志全局开关便于调试,优化部分机型可能出现的界面错乱或不显示等问题
(cherry picked from commit 5853ba7fe4e0cbe4f04b20c86e9fd84c5557139f)
This commit is contained in:
@@ -24,10 +24,25 @@ 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}');
|
||||
print('🎴 [SubscriptionCard] ScreenUtil - 12.w=${12.w}, 16.h=${16.h}, 44.w=${44.w}');
|
||||
|
||||
// 🔧 关键修复:添加最小高度约束和调试边框
|
||||
return Container(
|
||||
// 添加最小高度,确保卡片可见
|
||||
constraints: const BoxConstraints(minHeight: 180),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).cardColor,
|
||||
borderRadius: BorderRadius.circular(12.w),
|
||||
// 🔧 添加边框用于调试可见性
|
||||
border: Border.all(
|
||||
color: Colors.blue.withOpacity(0.3),
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -55,7 +70,10 @@ class KRSubscriptionCard extends StatelessWidget {
|
||||
style: KrAppTextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
||||
// 🔧 关键修复:确保文本颜色可见
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? Colors.white
|
||||
: Colors.black87,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user