fix(mobile-app): 优化数字显示组件防止自动换行
使用 FittedBox(fit: BoxFit.scaleDown) 包装所有可变数字显示组件, 确保当数字位数多时自动缩小字号而不是换行,提升用户视觉体验。 优化的页面和组件: - stickman_race_widget: 火柴人标签、排名列表数量、进度百分比 - team_tree_widget: 节点认种数、省略节点数量、详情弹窗 - ranking_page: 龙虎榜团队认种量 - trading_page: DST余额、绿积分余额 - profile_page: 各类收益金额、奖励项金额 - withdraw_usdt_page: 提款页余额 - deposit_usdt_page: 充值页余额 - ledger_detail_page: 净收益、收支概览、流水金额 - authorization_apply_page: 累计认种数 - planting_quantity_page: 可用余额 - mining_page: 用户序列号 - account_switch_page: 账号用户名、序列号 - wallet_created_page: 钱包地址信息 🤖 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
65e9422fe5
commit
6f8eaa8e92
|
|
@ -273,7 +273,11 @@ class _AccountSwitchPageState extends ConsumerState<AccountSwitchPage> {
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
account.username,
|
account.username,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -282,6 +286,8 @@ class _AccountSwitchPageState extends ConsumerState<AccountSwitchPage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
if (isCurrent) ...[
|
if (isCurrent) ...[
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Container(
|
Container(
|
||||||
|
|
@ -306,7 +312,10 @@ class _AccountSwitchPageState extends ConsumerState<AccountSwitchPage> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
account.userSerialNum,
|
account.userSerialNum,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|
@ -314,6 +323,7 @@ class _AccountSwitchPageState extends ConsumerState<AccountSwitchPage> {
|
||||||
color: Color(0x995D4037),
|
color: Color(0x995D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -304,6 +304,9 @@ class WalletCreatedPage extends ConsumerWidget {
|
||||||
const SizedBox(width: 14),
|
const SizedBox(width: 14),
|
||||||
// 标签和值 - 单行显示 "标签: 值"
|
// 标签和值 - 单行显示 "标签: 值"
|
||||||
Expanded(
|
Expanded(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Text(
|
||||||
'$label: $displayValue',
|
'$label: $displayValue',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
|
@ -315,6 +318,7 @@ class WalletCreatedPage extends ConsumerWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
// 复制按钮
|
// 复制按钮
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => _copyToClipboard(context, value, label),
|
onTap: () => _copyToClipboard(context, value, label),
|
||||||
|
|
|
||||||
|
|
@ -832,7 +832,10 @@ class _AuthorizationApplyPageState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
_hasPlanted ? '累计认种 $_plantedCount 棵' : '请先完成认种后再申请授权',
|
_hasPlanted ? '累计认种 $_plantedCount 棵' : '请先完成认种后再申请授权',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
@ -840,6 +843,7 @@ class _AuthorizationApplyPageState
|
||||||
color: Color(0xFF745D43),
|
color: Color(0xFF745D43),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -248,6 +248,7 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
||||||
children: [
|
children: [
|
||||||
// 完成数量标签
|
// 完成数量标签
|
||||||
Container(
|
Container(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 60),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: data.isCurrentUser
|
color: data.isCurrentUser
|
||||||
|
|
@ -255,6 +256,8 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
||||||
: const Color(0xFF8B5A2B),
|
: const Color(0xFF8B5A2B),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
child: Text(
|
child: Text(
|
||||||
'${_formatNumber(data.completedCount)}棵',
|
'${_formatNumber(data.completedCount)}棵',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
|
@ -265,6 +268,7 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
|
|
||||||
// 火柴人动画
|
// 火柴人动画
|
||||||
|
|
@ -481,7 +485,10 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
'本月收益: ${_formatCurrency(data.monthlyEarnings)} 绿积分',
|
'本月收益: ${_formatCurrency(data.monthlyEarnings)} 绿积分',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
|
|
@ -489,15 +496,21 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
||||||
color: Color(0xFF8B5A2B),
|
color: Color(0xFF8B5A2B),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// 完成数量和进度
|
// 完成数量和进度
|
||||||
Column(
|
ConstrainedBox(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 100),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
'${_formatNumber(data.completedCount)}棵',
|
'${_formatNumber(data.completedCount)}棵',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -506,8 +519,12 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
||||||
color: Color(0xFFD4AF37),
|
color: Color(0xFFD4AF37),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
'${(data.progress * 100).toStringAsFixed(1)}%',
|
'${(data.progress * 100).toStringAsFixed(1)}%',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
|
|
@ -515,8 +532,10 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
||||||
color: Color(0xFF8B5A2B),
|
color: Color(0xFF8B5A2B),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -378,6 +378,9 @@ class _DepositUsdtPageState extends ConsumerState<DepositUsdtPage> {
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Text(
|
||||||
'可用余额: $_balance 绿积分',
|
'可用余额: $_balance 绿积分',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -387,6 +390,7 @@ class _DepositUsdtPageState extends ConsumerState<DepositUsdtPage> {
|
||||||
color: const Color(0xFF5D4037).withValues(alpha: 0.8),
|
color: const Color(0xFF5D4037).withValues(alpha: 0.8),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,10 @@ class _MiningPageState extends ConsumerState<MiningPage> {
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
else if (_walletStatus == WalletCreationStatus.ready)
|
else if (_walletStatus == WalletCreationStatus.ready)
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
'序列号$_serialNumber',
|
'序列号$_serialNumber',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
|
|
@ -430,6 +433,7 @@ class _MiningPageState extends ConsumerState<MiningPage> {
|
||||||
letterSpacing: -0.3,
|
letterSpacing: -0.3,
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
// unknown 状态也显示"创建账号审核中..."
|
// unknown 状态也显示"创建账号审核中..."
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,9 @@ class _PlantingQuantityPageState extends ConsumerState<PlantingQuantityPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text(
|
: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: Text(
|
||||||
_formatNumber(_availableBalance),
|
_formatNumber(_availableBalance),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 36,
|
fontSize: 36,
|
||||||
|
|
@ -434,6 +436,7 @@ class _PlantingQuantityPageState extends ConsumerState<PlantingQuantityPage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -2029,7 +2029,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xCC5D4037),
|
color: Color(0xCC5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
_formatNumber(_pendingUsdt),
|
_formatNumber(_pendingUsdt),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -2039,6 +2043,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// TODO: 暂时隐藏贡献值显示
|
// TODO: 暂时隐藏贡献值显示
|
||||||
|
|
@ -2183,7 +2189,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
// 第二行:金额信息
|
// 第二行:金额信息
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
amountText,
|
amountText,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -2192,6 +2201,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
// 第三行:备注信息
|
// 第三行:备注信息
|
||||||
if (item.memo.isNotEmpty) ...[
|
if (item.memo.isNotEmpty) ...[
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
|
|
@ -2310,7 +2320,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
// 第二行:金额信息
|
// 第二行:金额信息
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
amountText,
|
amountText,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -2319,6 +2332,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
// 第三行:备注信息(如果有)
|
// 第三行:备注信息(如果有)
|
||||||
if (item.memo.isNotEmpty) ...[
|
if (item.memo.isNotEmpty) ...[
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
|
|
@ -2366,7 +2380,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xCC5D4037),
|
color: Color(0xCC5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
_formatNumber(_settleableUsdt),
|
_formatNumber(_settleableUsdt),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
@ -2376,6 +2394,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// 可结算奖励明细列表
|
// 可结算奖励明细列表
|
||||||
|
|
@ -2432,7 +2452,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xCC5D4037),
|
color: Color(0xCC5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
_formatNumber(_settledUsdt),
|
_formatNumber(_settledUsdt),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
@ -2442,6 +2466,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
|
|
@ -2539,7 +2565,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
// 第二行:金额信息
|
// 第二行:金额信息
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
amountText,
|
amountText,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -2548,6 +2577,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -2622,7 +2652,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
// 第二行:金额信息
|
// 第二行:金额信息
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
amountText,
|
amountText,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -2631,6 +2664,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
@ -2649,7 +2683,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
amountText,
|
amountText,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
|
|
@ -2658,6 +2696,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF4CAF50),
|
color: Color(0xFF4CAF50),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -2705,7 +2745,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xCC5D4037),
|
color: Color(0xCC5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
_formatNumber(_expiredUsdt),
|
_formatNumber(_expiredUsdt),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
@ -2715,6 +2759,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// TODO: 暂时隐藏贡献值显示
|
// TODO: 暂时隐藏贡献值显示
|
||||||
|
|
@ -2853,7 +2899,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
// 第二行:金额信息
|
// 第二行:金额信息
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
amountText,
|
amountText,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -2862,6 +2911,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF999999), // 灰色文字
|
color: Color(0xFF999999), // 灰色文字
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -2935,7 +2985,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
// 第二行:金额信息
|
// 第二行:金额信息
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
amountText,
|
amountText,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -2944,6 +2997,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF999999),
|
color: Color(0xFF999999),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
@ -2962,7 +3016,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFF999999),
|
color: Color(0xFF999999),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
amountText,
|
amountText,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
|
|
@ -2971,6 +3029,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
color: Color(0xFFE57373),
|
color: Color(0xFFE57373),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,9 @@ class _TeamTreeWidgetState extends State<TeamTreeWidget> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
// 个人/团队认种数
|
// 个人/团队认种数
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: Text(
|
||||||
'${node.personalPlantingCount}/${node.teamPlantingCount}',
|
'${node.personalPlantingCount}/${node.teamPlantingCount}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
|
|
@ -249,6 +251,7 @@ class _TeamTreeWidgetState extends State<TeamTreeWidget> {
|
||||||
color: Color(0xCC5D4037),
|
color: Color(0xCC5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
// 展开/收起按钮
|
// 展开/收起按钮
|
||||||
if (node.hasChildren)
|
if (node.hasChildren)
|
||||||
|
|
@ -303,7 +306,9 @@ class _TeamTreeWidgetState extends State<TeamTreeWidget> {
|
||||||
color: Color(0xFF666666),
|
color: Color(0xFF666666),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: Text(
|
||||||
'+${hiddenNodes.length}',
|
'+${hiddenNodes.length}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
|
|
@ -312,6 +317,7 @@ class _TeamTreeWidgetState extends State<TeamTreeWidget> {
|
||||||
color: Color(0xFF666666),
|
color: Color(0xFF666666),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -534,7 +540,10 @@ class _HiddenNodesSheet extends StatelessWidget {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
subtitle: Text(
|
subtitle: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
'个人/团队: ${node.personalPlantingCount}/${node.teamPlantingCount}',
|
'个人/团队: ${node.personalPlantingCount}/${node.teamPlantingCount}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|
@ -542,6 +551,7 @@ class _HiddenNodesSheet extends StatelessWidget {
|
||||||
color: Color(0xCC5D4037),
|
color: Color(0xCC5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
trailing: node.hasChildren
|
trailing: node.hasChildren
|
||||||
? Text(
|
? Text(
|
||||||
'${node.directReferralCount}人',
|
'${node.directReferralCount}人',
|
||||||
|
|
@ -740,7 +750,11 @@ class _NodeDetailsSheet extends StatelessWidget {
|
||||||
color: Color(0xFF8B5A2B),
|
color: Color(0xFF8B5A2B),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
value,
|
value,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
@ -749,6 +763,8 @@ class _NodeDetailsSheet extends StatelessWidget {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -381,10 +381,15 @@ class _RankingPageState extends ConsumerState<RankingPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 团队认种量
|
// 团队认种量
|
||||||
Column(
|
ConstrainedBox(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 100),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
_formatNumber(item.teamPlantingAmount),
|
_formatNumber(item.teamPlantingAmount),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -394,6 +399,7 @@ class _RankingPageState extends ConsumerState<RankingPage> {
|
||||||
color: Color(0xFFD4AF37),
|
color: Color(0xFFD4AF37),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const Text(
|
const Text(
|
||||||
'团队认种量',
|
'团队认种量',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -405,6 +411,7 @@ class _RankingPageState extends ConsumerState<RankingPage> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -440,7 +440,11 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
'${(stats?.netAmount ?? 0) >= 0 ? '+' : ''}${_formatAmount(stats?.netAmount ?? 0)} 绿积分',
|
'${(stats?.netAmount ?? 0) >= 0 ? '+' : ''}${_formatAmount(stats?.netAmount ?? 0)} 绿积分',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
|
|
@ -450,6 +454,8 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
: const Color(0xFFE53935),
|
: const Color(0xFFE53935),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -485,7 +491,9 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: Text(
|
||||||
_formatAmount(amount),
|
_formatAmount(amount),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
|
|
@ -493,6 +501,7 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
color: color,
|
color: color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const Text(
|
const Text(
|
||||||
'绿积分',
|
'绿积分',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -662,7 +671,9 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: Text(
|
||||||
_formatAmount(amount),
|
_formatAmount(amount),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|
@ -670,6 +681,7 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
color: color,
|
color: color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -760,7 +772,11 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
'${isIncome ? '+' : ''}${_formatAmount(item.totalAmount)}',
|
'${isIncome ? '+' : ''}${_formatAmount(item.totalAmount)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
@ -768,6 +784,8 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
color: isIncome ? const Color(0xFF4CAF50) : const Color(0xFFE53935),
|
color: isIncome ? const Color(0xFF4CAF50) : const Color(0xFFE53935),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -978,10 +996,15 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 金额
|
// 金额
|
||||||
Column(
|
ConstrainedBox(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 120),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
'${isIncome ? '+' : ''}${_formatAmount(entry.amount)}',
|
'${isIncome ? '+' : ''}${_formatAmount(entry.amount)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
@ -989,18 +1012,24 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
color: isIncome ? const Color(0xFF4CAF50) : const Color(0xFFE53935),
|
color: isIncome ? const Color(0xFF4CAF50) : const Color(0xFFE53935),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
if (entry.balanceAfter != null) ...[
|
if (entry.balanceAfter != null) ...[
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text(
|
||||||
'余额: ${_formatAmount(entry.balanceAfter!)}',
|
'余额: ${_formatAmount(entry.balanceAfter!)}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
color: Color(0x995D4037),
|
color: Color(0x995D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -534,7 +534,9 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFD4AF37)),
|
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFD4AF37)),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text(
|
: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: Text(
|
||||||
'DST 余额: ${_formatNumber(_dstBalance)}',
|
'DST 余额: ${_formatNumber(_dstBalance)}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
@ -542,6 +544,7 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
||||||
height: 1.5,
|
height: 1.5,
|
||||||
color: Color(0x995D4037),
|
color: Color(0x995D4037),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -616,7 +619,9 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFD4AF37)),
|
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFD4AF37)),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text(
|
: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: Text(
|
||||||
'绿积分 余额: ${_formatNumber(_usdtBalance)}',
|
'绿积分 余额: ${_formatNumber(_usdtBalance)}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
@ -624,6 +629,7 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
||||||
height: 1.5,
|
height: 1.5,
|
||||||
color: Color(0x995D4037),
|
color: Color(0x995D4037),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -568,7 +568,11 @@ class _WithdrawUsdtPageState extends ConsumerState<WithdrawUsdtPage> {
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Flexible(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
_formatNumber(_usdtBalance),
|
_formatNumber(_usdtBalance),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 32,
|
fontSize: 32,
|
||||||
|
|
@ -578,6 +582,8 @@ class _WithdrawUsdtPageState extends ConsumerState<WithdrawUsdtPage> {
|
||||||
color: Color(0xFF5D4037),
|
color: Color(0xFF5D4037),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.only(bottom: 4),
|
padding: EdgeInsets.only(bottom: 4),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue