Wallet update for correct name and symbol appearance

This commit is contained in:
Arseni
2025-12-16 19:37:28 +03:00
parent 67b52af150
commit 9a90e6a03b
12 changed files with 111 additions and 117 deletions

View File

@@ -34,8 +34,8 @@ class WalletCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BalanceHeader(
walletName: wallet.name,
walletId: wallet.walletUserID,
walletNetwork: wallet.network,
tokenSymbol: wallet.tokenSymbol,
),
BalanceAmount(
wallet: wallet,

View File

@@ -2,37 +2,46 @@ import 'package:flutter/material.dart';
class BalanceHeader extends StatelessWidget {
final String walletName;
final String walletId;
final String? walletNetwork;
final String? tokenSymbol;
const BalanceHeader({
super.key,
required this.walletName,
required this.walletId,
this.walletNetwork,
this.tokenSymbol,
});
static const double _spacing = 8.0;
@override
Widget build(BuildContext context) {
final textTheme = Theme.of(context).textTheme;
final colorScheme = Theme.of(context).colorScheme;
final symbol = tokenSymbol?.trim();
return Row(
children: [
Text(
walletName,
'Crypto Wallet',
style: textTheme.titleMedium?.copyWith(
color: colorScheme.onSurface,
),
),
const SizedBox(width: _spacing),
Text(
walletId,
style: textTheme.bodySmall?.copyWith(
color: colorScheme.onSurface,
if (symbol != null && symbol.isNotEmpty) ...[
const SizedBox(width: 8),
Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
decoration: BoxDecoration(
color: colorScheme.primaryContainer,
borderRadius: BorderRadius.circular(999),
),
child: Text(
symbol,
style: textTheme.bodyMedium?.copyWith(
color: colorScheme.onPrimaryContainer,
fontWeight: FontWeight.w600,
),
),
),
),
],
],
);
}