test: 暂时禁用堆叠卡片组件以测试华为恶意软件检测

- 注释掉 stacked_cards_widget.dart 的导入
- 注释掉 StackedCardsView 组件的使用
- 注释掉 _buildStackedPendingRewardCard 方法
- 恢复原始的待领取明细列表展示方式

🤖 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-16 23:54:29 -08:00
parent 60b41f991c
commit cceae5452a
1 changed files with 143 additions and 136 deletions

View File

@ -18,7 +18,8 @@ import '../../../../routes/route_paths.dart';
import '../../../../routes/app_router.dart';
import '../../../auth/presentation/providers/auth_provider.dart';
import '../widgets/team_tree_widget.dart';
import '../widgets/stacked_cards_widget.dart';
// TODO:
// import '../widgets/stacked_cards_widget.dart';
/// -
///
@ -1842,147 +1843,153 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
],
),
const SizedBox(height: 8),
//
StackedCardsView<PendingRewardItem>(
items: _pendingRewards,
peekHeight: 28,
expandedCardHeight: 110,
enableSound: true,
itemBuilder: (item, isSelected, index) => _buildStackedPendingRewardCard(item, isSelected),
),
// TODO:
// StackedCardsView<PendingRewardItem>(
// items: _pendingRewards,
// peekHeight: 28,
// expandedCardHeight: 110,
// enableSound: true,
// itemBuilder: (item, isSelected, index) => _buildStackedPendingRewardCard(item, isSelected),
// ),
//
..._pendingRewards.map((item) => Padding(
padding: const EdgeInsets.only(bottom: 8),
child: _buildPendingRewardItem(item),
)),
],
],
);
}
///
Widget _buildStackedPendingRewardCard(PendingRewardItem item, bool isSelected) {
//
final remainingSeconds = item.remainingSeconds > 0 ? item.remainingSeconds : 0;
final hours = (remainingSeconds ~/ 3600).toString().padLeft(2, '0');
final minutes = ((remainingSeconds % 3600) ~/ 60).toString().padLeft(2, '0');
final seconds = (remainingSeconds % 60).toString().padLeft(2, '0');
final countdown = '$hours:$minutes:$seconds';
// TODO:
// ///
// Widget _buildStackedPendingRewardCard(PendingRewardItem item, bool isSelected) {
// //
// final remainingSeconds = item.remainingSeconds > 0 ? item.remainingSeconds : 0;
// final hours = (remainingSeconds ~/ 3600).toString().padLeft(2, '0');
// final minutes = ((remainingSeconds % 3600) ~/ 60).toString().padLeft(2, '0');
// final seconds = (remainingSeconds % 60).toString().padLeft(2, '0');
// final countdown = '$hours:$minutes:$seconds';
//
// //
// final List<String> amountParts = [];
// if (item.usdtAmount > 0) {
// amountParts.add('${_formatNumber(item.usdtAmount)} 绿积分');
// }
// if (item.hashpowerAmount > 0) {
// amountParts.add('${_formatNumber(item.hashpowerAmount)} 算力');
// }
// final amountText = amountParts.isNotEmpty ? amountParts.join(' ') : '0 绿积分';
//
// return Container(
// height: isSelected ? 110 : 48,
// decoration: BoxDecoration(
// color: isSelected ? Colors.white : const Color(0xFFFFFDF8),
// borderRadius: BorderRadius.circular(8),
// border: Border.all(
// color: isSelected ? const Color(0x44D4AF37) : const Color(0x22D4AF37),
// width: isSelected ? 1.5 : 1,
// ),
// ),
// child: isSelected
// ? Padding(
// padding: const EdgeInsets.all(12),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// // +
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// item.rightTypeName,
// style: const TextStyle(
// fontSize: 14,
// fontFamily: 'Inter',
// fontWeight: FontWeight.w600,
// color: Color(0xFF5D4037),
// ),
// ),
// Row(
// children: [
// const Icon(
// Icons.timer_outlined,
// size: 14,
// color: Color(0xFFD4AF37),
// ),
// const SizedBox(width: 4),
// Text(
// countdown,
// style: const TextStyle(
// fontSize: 12,
// fontFamily: 'Consolas',
// fontWeight: FontWeight.w600,
// color: Color(0xFFD4AF37),
// ),
// ),
// ],
// ),
// ],
// ),
// const SizedBox(height: 8),
// //
// Text(
// amountText,
// style: const TextStyle(
// fontSize: 16,
// fontFamily: 'Inter',
// fontWeight: FontWeight.w700,
// color: Color(0xFF5D4037),
// ),
// ),
// //
// 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,
// ),
// ],
// ],
// ),
// )
// : Padding(
// //
// padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// item.rightTypeName,
// style: const TextStyle(
// fontSize: 13,
// fontFamily: 'Inter',
// fontWeight: FontWeight.w500,
// color: Color(0xFF5D4037),
// ),
// ),
// Text(
// amountText,
// style: const TextStyle(
// fontSize: 13,
// fontFamily: 'Inter',
// fontWeight: FontWeight.w600,
// color: Color(0xFFD4AF37),
// ),
// ),
// ],
// ),
// ),
// );
// }
//
final List<String> amountParts = [];
if (item.usdtAmount > 0) {
amountParts.add('${_formatNumber(item.usdtAmount)} 绿积分');
}
if (item.hashpowerAmount > 0) {
amountParts.add('${_formatNumber(item.hashpowerAmount)} 算力');
}
final amountText = amountParts.isNotEmpty ? amountParts.join(' ') : '0 绿积分';
return Container(
height: isSelected ? 110 : 48,
decoration: BoxDecoration(
color: isSelected ? Colors.white : const Color(0xFFFFFDF8),
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: isSelected ? const Color(0x44D4AF37) : const Color(0x22D4AF37),
width: isSelected ? 1.5 : 1,
),
),
child: isSelected
? Padding(
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// +
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
item.rightTypeName,
style: const TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color: Color(0xFF5D4037),
),
),
Row(
children: [
const Icon(
Icons.timer_outlined,
size: 14,
color: Color(0xFFD4AF37),
),
const SizedBox(width: 4),
Text(
countdown,
style: const TextStyle(
fontSize: 12,
fontFamily: 'Consolas',
fontWeight: FontWeight.w600,
color: Color(0xFFD4AF37),
),
),
],
),
],
),
const SizedBox(height: 8),
//
Text(
amountText,
style: const TextStyle(
fontSize: 16,
fontFamily: 'Inter',
fontWeight: FontWeight.w700,
color: Color(0xFF5D4037),
),
),
//
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,
),
],
],
),
)
: Padding(
//
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
item.rightTypeName,
style: const TextStyle(
fontSize: 13,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
color: Color(0xFF5D4037),
),
),
Text(
amountText,
style: const TextStyle(
fontSize: 13,
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color: Color(0xFFD4AF37),
),
),
],
),
),
);
}
///
///
Widget _buildPendingRewardItem(PendingRewardItem item) {
//
final remainingSeconds = item.remainingSeconds > 0 ? item.remainingSeconds : 0;