This commit is contained in:
2026-03-29 15:42:11 +03:00
parent 7c6089252d
commit 1f6d129fc2
4 changed files with 44 additions and 69 deletions
@@ -274,10 +274,10 @@ class TransactionTile extends ConsumerWidget {
List<Account> accounts,
Account? activeAccount,
) {
// Fallback if no counterpart
final s = ref.watch(stringsProvider);
if (counterpart == null) {
return Text(
'Transfer',
s.transferLabel,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w600,
color: Theme.of(context).colorScheme.onSurface,
@@ -298,13 +298,12 @@ class TransactionTile extends ConsumerWidget {
final destAccountName = _accountName(accounts, destAccountId);
final onSurface = Theme.of(context).colorScheme.onSurface;
// Total Balance view (activeAccount == null), showing expense side
if (activeAccount == null) {
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Transfer',
s.transferLabel,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w600,
color: onSurface,
@@ -321,14 +320,12 @@ class TransactionTile extends ConsumerWidget {
);
}
// Account view
if (isExpense) {
// Expense side: Transfer to <destAccountName>
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Transfer',
s.transferLabel,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w600,
color: onSurface,
@@ -336,7 +333,7 @@ class TransactionTile extends ConsumerWidget {
),
const SizedBox(width: 6),
Text(
'to',
s.transferTo,
style: TextStyle(
fontSize: 11,
color: onSurface.withOpacity(0.45),
@@ -348,12 +345,11 @@ class TransactionTile extends ConsumerWidget {
],
);
} else {
// Income side: Transfer from <sourceAccountName>
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Transfer',
s.transferLabel,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w600,
color: onSurface,
@@ -361,7 +357,7 @@ class TransactionTile extends ConsumerWidget {
),
const SizedBox(width: 6),
Text(
'from',
s.transferFrom,
style: TextStyle(
fontSize: 11,
color: onSurface.withOpacity(0.45),