Revert "revert(profile): 回滚profile_page.dart到稳定版本"

This reverts commit b06f186836.
This commit is contained in:
hailin 2025-12-24 03:16:39 -08:00
parent b06f186836
commit a38727eb7f
1 changed files with 53 additions and 15 deletions

View File

@ -609,9 +609,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
nickname: r.nickname,
avatarUrl: r.avatarUrl,
completedCount: r.completedCount,
targetCount: 50000, // 5
targetCount: 50000, // 5
monthlyEarnings: r.monthlyEarnings,
isCurrentUser: r.isCurrentUser,
accountSequence: r.accountSequence,
)).toList();
});
}
@ -642,9 +643,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
nickname: r.nickname,
avatarUrl: r.avatarUrl,
completedCount: r.completedCount,
targetCount: 10000, // 1
targetCount: 10000, // 1
monthlyEarnings: r.monthlyEarnings,
isCurrentUser: r.isCurrentUser,
accountSequence: r.accountSequence,
)).toList();
});
}
@ -2203,18 +2205,29 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
),
),
),
//
// memo
if (item.memo.isNotEmpty) ...[
const SizedBox(height: 4),
Text(
item.memo,
style: const TextStyle(
fontSize: 11,
fontFamily: 'Inter',
color: Color(0x995D4037),
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
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,
);
},
),
],
],
@ -2431,7 +2444,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
StackedCardsView<SettleableRewardItem>(
items: _settleableRewards,
peekHeight: 28,
expandedCardHeight: 90,
expandedCardHeight: 110,
enableSound: true,
itemBuilder: (item, isSelected, index) => _buildStackedSettleableRewardCard(item, isSelected),
),
@ -2604,7 +2617,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
final amountText = amountParts.isNotEmpty ? amountParts.join(' ') : '0 绿积分';
return Container(
height: isSelected ? 90 : 48,
height: isSelected ? 110 : 48,
decoration: BoxDecoration(
color: isSelected ? Colors.white : const Color(0xFFFFFDF8),
borderRadius: BorderRadius.circular(8),
@ -2653,7 +2666,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
),
],
),
const SizedBox(height: 8),
const SizedBox(height: 6),
//
FittedBox(
fit: BoxFit.scaleDown,
@ -2668,6 +2681,31 @@ 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,
);
},
),
],
],
),
)