This commit is contained in:
sion
2026-04-06 10:43:01 +08:00
parent 93df15244a
commit d4b0c6c128
14 changed files with 541 additions and 610 deletions

View File

@@ -473,6 +473,65 @@ void showWithdrawDialog(BuildContext context, String? balance) {
validator: Validators.amount,
),
const SizedBox(height: AppSpacing.md),
// 手续费/应收款提示
ValueListenableBuilder<String>(
valueListenable: feeNotifier,
builder: (_, feeText, __) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md, vertical: AppSpacing.sm),
decoration: BoxDecoration(
color: colorScheme.surfaceContainerHigh.withValues(alpha: 0.5),
borderRadius: BorderRadius.circular(AppRadius.md),
),
child: Row(
children: [
Icon(Icons.info_outline, size: 14, color: colorScheme.onSurfaceVariant),
const SizedBox(width: AppSpacing.xs),
Expanded(
child: Text(
feeText,
style: AppTextStyles.bodySmall(context).copyWith(
color: colorScheme.onSurfaceVariant,
),
),
),
],
),
);
},
),
const SizedBox(height: AppSpacing.md),
// 提现网络选择
ValueListenableBuilder<List<String>>(
valueListenable: networksNotifier,
builder: (_, networks, __) {
if (networks.isEmpty) return const SizedBox.shrink();
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('提现网络', style: AppTextStyles.bodyMedium(context).copyWith(
fontWeight: FontWeight.w500,
)),
const SizedBox(height: AppSpacing.xs),
ValueListenableBuilder<String?>(
valueListenable: selectedNetworkNotifier,
builder: (_, selected, __) {
return ShadSelect<String>(
placeholder: const Text('选择提现网络'),
initialValue: selected,
selectedOptionBuilder: (context, val) => Text(val),
onChanged: (value) {
if (value != null) selectedNetworkNotifier.value = value;
},
options: networks.map((n) => ShadOption(value: n, child: Text(n))).toList(),
);
},
),
],
);
},
),
const SizedBox(height: AppSpacing.md),
ShadInputFormField(
id: 'address',
controller: addressController,
@@ -516,6 +575,7 @@ void showWithdrawDialog(BuildContext context, String? balance) {
withdrawContact: contactController.text.isNotEmpty
? contactController.text
: null,
network: selectedNetworkNotifier.value,
);
if (context.mounted) {
showResultDialog(

View File

@@ -20,9 +20,7 @@ class BalanceCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final displayBalance = activeTab == 0
? (provider.fundAccount?.balance ?? provider.overview?.fundBalance ?? '0.00')
: _calculateTradeTotal();
final displayBalance = balance;
return GlassPanel(
padding: const EdgeInsets.all(20),