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