Wallet update for correct name and symbol appearance
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user