fix: 资产卡片金额自适应缩放,防止换行
This commit is contained in:
@@ -35,16 +35,24 @@ class BalanceCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
_formatBalance(displayBalance),
|
||||
style: AppTextStyles.numberLarge(context),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
_formatBalance(displayBalance),
|
||||
style: AppTextStyles.numberLarge(context),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'\u2248 \$${_formatBalance(displayBalance)} USD',
|
||||
style: AppTextStyles.bodyMedium(context).copyWith(
|
||||
color: context.appColors.onSurfaceMuted,
|
||||
fontWeight: FontWeight.w400,
|
||||
const SizedBox(height: 8),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'\u2248 \$${_formatBalance(displayBalance)} USD',
|
||||
style: AppTextStyles.bodyMedium(context).copyWith(
|
||||
color: context.appColors.onSurfaceMuted,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user