fix(profile): 修复嵌套 Row 无界约束导致的白屏问题

在 _buildSettlementSection 的"已结算"区域,内层 Row 中使用了 Flexible,
但内层 Row 没有宽度约束,导致 RenderFlex unbounded width constraints 错误。
通过在内层 Row 外添加 Expanded 包裹来提供宽度约束。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-24 03:41:23 -08:00
parent 1cd4b352a4
commit ee4cac59c7
1 changed files with 27 additions and 25 deletions

View File

@ -2475,35 +2475,37 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
const Text(
'已结算 (绿积分)',
style: TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
height: 1.5,
color: Color(0xCC5D4037),
Expanded(
child: Row(
children: [
const Text(
'已结算 (绿积分)',
style: TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
height: 1.5,
color: Color(0xCC5D4037),
),
),
),
Flexible(
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(
_formatNumber(_settledUsdt),
style: const TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w700,
height: 1.5,
color: Color(0xFF5D4037),
Flexible(
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(
_formatNumber(_settledUsdt),
style: const TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w700,
height: 1.5,
color: Color(0xFF5D4037),
),
),
),
),
),
],
],
),
),
GestureDetector(
onTap: _onSettlement,