solyanka iz fix for payout page design, ledger wallet now clickable

This commit is contained in:
Arseni
2026-03-05 15:48:52 +03:00
parent a9b00b6871
commit d6a3a0cc5b
31 changed files with 596 additions and 370 deletions

View File

@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:pshared/controllers/balance_mask/wallets.dart';
import 'package:pshared/controllers/payment/source.dart';
import 'package:pweb/generated/i18n/app_localizations.dart';
@@ -12,15 +12,20 @@ class WalletEditHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
final controller = context.watch<WalletsController>();
final controller = context.watch<PaymentSourceController>();
final wallet = controller.selectedWallet;
final ledger = controller.selectedLedgerAccount;
final loc = AppLocalizations.of(context)!;
if (wallet == null) {
if (wallet == null && ledger == null) {
return const SizedBox.shrink();
}
final theme = Theme.of(context);
final title = wallet != null
? loc.paymentTypeCryptoWallet
: loc.paymentTypeLedger;
final subtitle = wallet?.tokenSymbol;
return Row(
spacing: 8,
@@ -32,14 +37,14 @@ class WalletEditHeader extends StatelessWidget {
spacing: 4,
children: [
Text(
loc.paymentTypeCryptoWallet,
style: theme.textTheme.headlineMedium!.copyWith(
title,
style: theme.textTheme.headlineMedium?.copyWith(
fontWeight: FontWeight.bold,
),
),
if (wallet.tokenSymbol != null)
if (subtitle != null && subtitle.trim().isNotEmpty)
Text(
wallet.tokenSymbol!,
subtitle,
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),