revert(profile): 回滚profile_page.dart到稳定版本
修复SVG头像渲染导致的白屏问题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e2872b13fb
commit
b06f186836
|
|
@ -609,10 +609,9 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
nickname: r.nickname,
|
nickname: r.nickname,
|
||||||
avatarUrl: r.avatarUrl,
|
avatarUrl: r.avatarUrl,
|
||||||
completedCount: r.completedCount,
|
completedCount: r.completedCount,
|
||||||
targetCount: 50000, // 省公司目标固定5万
|
targetCount: 50000, // 省公司目标5万
|
||||||
monthlyEarnings: r.monthlyEarnings,
|
monthlyEarnings: r.monthlyEarnings,
|
||||||
isCurrentUser: r.isCurrentUser,
|
isCurrentUser: r.isCurrentUser,
|
||||||
accountSequence: r.accountSequence,
|
|
||||||
)).toList();
|
)).toList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -643,10 +642,9 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
nickname: r.nickname,
|
nickname: r.nickname,
|
||||||
avatarUrl: r.avatarUrl,
|
avatarUrl: r.avatarUrl,
|
||||||
completedCount: r.completedCount,
|
completedCount: r.completedCount,
|
||||||
targetCount: 10000, // 市公司目标固定1万
|
targetCount: 10000, // 市公司目标1万
|
||||||
monthlyEarnings: r.monthlyEarnings,
|
monthlyEarnings: r.monthlyEarnings,
|
||||||
isCurrentUser: r.isCurrentUser,
|
isCurrentUser: r.isCurrentUser,
|
||||||
accountSequence: r.accountSequence,
|
|
||||||
)).toList();
|
)).toList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -2205,29 +2203,18 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 第三行:来源信息(从 memo 中提取,去掉权益类型前缀)
|
// 第三行:备注信息
|
||||||
if (item.memo.isNotEmpty) ...[
|
if (item.memo.isNotEmpty) ...[
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Builder(
|
Text(
|
||||||
builder: (context) {
|
item.memo,
|
||||||
// memo 格式如 "分享权益:来自用户D25122400000的认种"
|
style: const TextStyle(
|
||||||
// 去掉前缀,只显示 "来自用户xxx的认种" 部分
|
fontSize: 11,
|
||||||
String displayMemo = item.memo;
|
fontFamily: 'Inter',
|
||||||
final colonIndex = displayMemo.indexOf(':');
|
color: Color(0x995D4037),
|
||||||
if (colonIndex != -1 && colonIndex < displayMemo.length - 1) {
|
),
|
||||||
displayMemo = displayMemo.substring(colonIndex + 1);
|
maxLines: 2,
|
||||||
}
|
overflow: TextOverflow.ellipsis,
|
||||||
return Text(
|
|
||||||
displayMemo,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 11,
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
color: Color(0x995D4037),
|
|
||||||
),
|
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -2444,7 +2431,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
StackedCardsView<SettleableRewardItem>(
|
StackedCardsView<SettleableRewardItem>(
|
||||||
items: _settleableRewards,
|
items: _settleableRewards,
|
||||||
peekHeight: 28,
|
peekHeight: 28,
|
||||||
expandedCardHeight: 110,
|
expandedCardHeight: 90,
|
||||||
enableSound: true,
|
enableSound: true,
|
||||||
itemBuilder: (item, isSelected, index) => _buildStackedSettleableRewardCard(item, isSelected),
|
itemBuilder: (item, isSelected, index) => _buildStackedSettleableRewardCard(item, isSelected),
|
||||||
),
|
),
|
||||||
|
|
@ -2617,7 +2604,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
final amountText = amountParts.isNotEmpty ? amountParts.join(' ') : '0 绿积分';
|
final amountText = amountParts.isNotEmpty ? amountParts.join(' ') : '0 绿积分';
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
height: isSelected ? 110 : 48,
|
height: isSelected ? 90 : 48,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isSelected ? Colors.white : const Color(0xFFFFFDF8),
|
color: isSelected ? Colors.white : const Color(0xFFFFFDF8),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
|
@ -2666,7 +2653,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 8),
|
||||||
// 第二行:金额信息
|
// 第二行:金额信息
|
||||||
FittedBox(
|
FittedBox(
|
||||||
fit: BoxFit.scaleDown,
|
fit: BoxFit.scaleDown,
|
||||||
|
|
@ -2681,31 +2668,6 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 第三行:来源信息(从 memo 中提取,去掉权益类型前缀)
|
|
||||||
if (item.memo.isNotEmpty) ...[
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
Builder(
|
|
||||||
builder: (context) {
|
|
||||||
// memo 格式如 "分享权益:来自用户D25122400000的认种"
|
|
||||||
// 去掉前缀,只显示 "来自用户xxx的认种" 部分
|
|
||||||
String displayMemo = item.memo;
|
|
||||||
final colonIndex = displayMemo.indexOf(':');
|
|
||||||
if (colonIndex != -1 && colonIndex < displayMemo.length - 1) {
|
|
||||||
displayMemo = displayMemo.substring(colonIndex + 1);
|
|
||||||
}
|
|
||||||
return Text(
|
|
||||||
displayMemo,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 11,
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
color: Color(0x995D4037),
|
|
||||||
),
|
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue