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,13 +273,19 @@ class _AccountSwitchPageState extends ConsumerState<AccountSwitchPage> {
|
|||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
account.username,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF5D4037),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
account.username,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isCurrent) ...[
|
||||
|
|
@ -306,12 +312,16 @@ class _AccountSwitchPageState extends ConsumerState<AccountSwitchPage> {
|
|||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
account.userSerialNum,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0x995D4037),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
account.userSerialNum,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0x995D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -304,14 +304,18 @@ class WalletCreatedPage extends ConsumerWidget {
|
|||
const SizedBox(width: 14),
|
||||
// 标签和值 - 单行显示 "标签: 值"
|
||||
Expanded(
|
||||
child: Text(
|
||||
'$label: $displayValue',
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1.5,
|
||||
color: Color(0xFF5D4037),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'$label: $displayValue',
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1.5,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -832,12 +832,16 @@ class _AuthorizationApplyPageState
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
_hasPlanted ? '累计认种 $_plantedCount 棵' : '请先完成认种后再申请授权',
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xFF745D43),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
_hasPlanted ? '累计认种 $_plantedCount 棵' : '请先完成认种后再申请授权',
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xFF745D43),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
|||
children: [
|
||||
// 完成数量标签
|
||||
Container(
|
||||
constraints: const BoxConstraints(maxWidth: 60),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: data.isCurrentUser
|
||||
|
|
@ -255,13 +256,16 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
|||
: const Color(0xFF8B5A2B),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Text(
|
||||
'${_formatNumber(data.completedCount)}棵',
|
||||
style: const TextStyle(
|
||||
fontSize: 9,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
'${_formatNumber(data.completedCount)}棵',
|
||||
style: const TextStyle(
|
||||
fontSize: 9,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -481,12 +485,16 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
|||
],
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
'本月收益: ${_formatCurrency(data.monthlyEarnings)} 绿积分',
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xFF8B5A2B),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'本月收益: ${_formatCurrency(data.monthlyEarnings)} 绿积分',
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xFF8B5A2B),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -494,28 +502,39 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
|||
),
|
||||
|
||||
// 完成数量和进度
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'${_formatNumber(data.completedCount)}棵',
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFFD4AF37),
|
||||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 100),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${_formatNumber(data.completedCount)}棵',
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFFD4AF37),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
'${(data.progress * 100).toStringAsFixed(1)}%',
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xFF8B5A2B),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${(data.progress * 100).toStringAsFixed(1)}%',
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xFF8B5A2B),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -378,13 +378,17 @@ class _DepositUsdtPageState extends ConsumerState<DepositUsdtPage> {
|
|||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Text(
|
||||
'可用余额: $_balance 绿积分',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
height: 1.5,
|
||||
color: const Color(0xFF5D4037).withValues(alpha: 0.8),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'可用余额: $_balance 绿积分',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
height: 1.5,
|
||||
color: const Color(0xFF5D4037).withValues(alpha: 0.8),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -420,15 +420,19 @@ class _MiningPageState extends ConsumerState<MiningPage> {
|
|||
],
|
||||
)
|
||||
else if (_walletStatus == WalletCreationStatus.ready)
|
||||
Text(
|
||||
'序列号$_serialNumber',
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.25,
|
||||
letterSpacing: -0.3,
|
||||
color: Color(0xFF5D4037),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'序列号$_serialNumber',
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.25,
|
||||
letterSpacing: -0.3,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
|
|
|
|||
|
|
@ -423,17 +423,20 @@ class _PlantingQuantityPageState extends ConsumerState<PlantingQuantityPage> {
|
|||
),
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
_formatNumber(_availableBalance),
|
||||
style: const TextStyle(
|
||||
fontSize: 36,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1.25,
|
||||
letterSpacing: -0.54,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
_formatNumber(_availableBalance),
|
||||
style: const TextStyle(
|
||||
fontSize: 36,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1.25,
|
||||
letterSpacing: -0.54,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2029,14 +2029,20 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
color: Color(0xCC5D4037),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
_formatNumber(_pendingUsdt),
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1.25,
|
||||
color: Color(0xFF5D4037),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
_formatNumber(_pendingUsdt),
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1.25,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2183,13 +2189,17 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
// 第二行:金额信息
|
||||
Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF5D4037),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
// 第三行:备注信息
|
||||
|
|
@ -2310,13 +2320,17 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
// 第二行:金额信息
|
||||
Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF5D4037),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
// 第三行:备注信息(如果有)
|
||||
|
|
@ -2366,14 +2380,20 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
color: Color(0xCC5D4037),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
_formatNumber(_settleableUsdt),
|
||||
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(_settleableUsdt),
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.5,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2432,14 +2452,20 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
color: Color(0xCC5D4037),
|
||||
),
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2539,13 +2565,17 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
// 第二行:金额信息
|
||||
Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF5D4037),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2622,13 +2652,17 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
// 第二行:金额信息
|
||||
Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF5D4037),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2649,13 +2683,19 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF4CAF50),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF4CAF50),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2705,14 +2745,20 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
color: Color(0xCC5D4037),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
_formatNumber(_expiredUsdt),
|
||||
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(_expiredUsdt),
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.5,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2853,13 +2899,17 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
// 第二行:金额信息
|
||||
Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF999999), // 灰色文字
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF999999), // 灰色文字
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2935,13 +2985,17 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
// 第二行:金额信息
|
||||
Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF999999),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF999999),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -2962,13 +3016,19 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
color: Color(0xFF999999),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFFE57373),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
amountText,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFFE57373),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -240,13 +240,16 @@ class _TeamTreeWidgetState extends State<TeamTreeWidget> {
|
|||
),
|
||||
const SizedBox(height: 2),
|
||||
// 个人/团队认种数
|
||||
Text(
|
||||
'${node.personalPlantingCount}/${node.teamPlantingCount}',
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xCC5D4037),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
'${node.personalPlantingCount}/${node.teamPlantingCount}',
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xCC5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
|
|
@ -303,13 +306,16 @@ class _TeamTreeWidgetState extends State<TeamTreeWidget> {
|
|||
color: Color(0xFF666666),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'+${hiddenNodes.length}',
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF666666),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
'+${hiddenNodes.length}',
|
||||
style: const TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF666666),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -534,12 +540,16 @@ class _HiddenNodesSheet extends StatelessWidget {
|
|||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'个人/团队: ${node.personalPlantingCount}/${node.teamPlantingCount}',
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xCC5D4037),
|
||||
subtitle: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'个人/团队: ${node.personalPlantingCount}/${node.teamPlantingCount}',
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xCC5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
trailing: node.hasChildren
|
||||
|
|
@ -740,13 +750,19 @@ class _NodeDetailsSheet extends StatelessWidget {
|
|||
color: Color(0xFF8B5A2B),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF5D4037),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -381,29 +381,36 @@ class _RankingPageState extends ConsumerState<RankingPage> {
|
|||
),
|
||||
),
|
||||
// 团队认种量
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
_formatNumber(item.teamPlantingAmount),
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.5,
|
||||
color: Color(0xFFD4AF37),
|
||||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 100),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
_formatNumber(item.teamPlantingAmount),
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.5,
|
||||
color: Color(0xFFD4AF37),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Text(
|
||||
'团队认种量',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
height: 1.5,
|
||||
color: Color(0xFF8B5A2B),
|
||||
const Text(
|
||||
'团队认种量',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
height: 1.5,
|
||||
color: Color(0xFF8B5A2B),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -440,14 +440,20 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
|||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${(stats?.netAmount ?? 0) >= 0 ? '+' : ''}${_formatAmount(stats?.netAmount ?? 0)} 绿积分',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: (stats?.netAmount ?? 0) >= 0
|
||||
? const Color(0xFF4CAF50)
|
||||
: const Color(0xFFE53935),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${(stats?.netAmount ?? 0) >= 0 ? '+' : ''}${_formatAmount(stats?.netAmount ?? 0)} 绿积分',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: (stats?.netAmount ?? 0) >= 0
|
||||
? const Color(0xFF4CAF50)
|
||||
: const Color(0xFFE53935),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -485,12 +491,15 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
|||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
_formatAmount(amount),
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: color,
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
_formatAmount(amount),
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Text(
|
||||
|
|
@ -662,12 +671,15 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
_formatAmount(amount),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: color,
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
_formatAmount(amount),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -760,12 +772,18 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
|||
],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${isIncome ? '+' : ''}${_formatAmount(item.totalAmount)}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: isIncome ? const Color(0xFF4CAF50) : const Color(0xFFE53935),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${isIncome ? '+' : ''}${_formatAmount(item.totalAmount)}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: isIncome ? const Color(0xFF4CAF50) : const Color(0xFFE53935),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -978,28 +996,39 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
|||
),
|
||||
),
|
||||
// 金额
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'${isIncome ? '+' : ''}${_formatAmount(entry.amount)}',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: isIncome ? const Color(0xFF4CAF50) : const Color(0xFFE53935),
|
||||
),
|
||||
),
|
||||
if (entry.balanceAfter != null) ...[
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'余额: ${_formatAmount(entry.balanceAfter!)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 10,
|
||||
color: Color(0x995D4037),
|
||||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 120),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'${isIncome ? '+' : ''}${_formatAmount(entry.amount)}',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: isIncome ? const Color(0xFF4CAF50) : const Color(0xFFE53935),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (entry.balanceAfter != null) ...[
|
||||
const SizedBox(height: 4),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
'余额: ${_formatAmount(entry.balanceAfter!)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 10,
|
||||
color: Color(0x995D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -534,13 +534,16 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
|||
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFD4AF37)),
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'DST 余额: ${_formatNumber(_dstBalance)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
height: 1.5,
|
||||
color: Color(0x995D4037),
|
||||
: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
'DST 余额: ${_formatNumber(_dstBalance)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
height: 1.5,
|
||||
color: Color(0x995D4037),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -616,13 +619,16 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
|||
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFD4AF37)),
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'绿积分 余额: ${_formatNumber(_usdtBalance)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
height: 1.5,
|
||||
color: Color(0x995D4037),
|
||||
: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
'绿积分 余额: ${_formatNumber(_usdtBalance)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter',
|
||||
height: 1.5,
|
||||
color: Color(0x995D4037),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -568,14 +568,20 @@ class _WithdrawUsdtPageState extends ConsumerState<WithdrawUsdtPage> {
|
|||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
_formatNumber(_usdtBalance),
|
||||
style: const TextStyle(
|
||||
fontSize: 32,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.2,
|
||||
color: Color(0xFF5D4037),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
_formatNumber(_usdtBalance),
|
||||
style: const TextStyle(
|
||||
fontSize: 32,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.2,
|
||||
color: Color(0xFF5D4037),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
|
|
|
|||
Loading…
Reference in New Issue