solyanka iz fix for payout page design, ledger wallet now clickable
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user