Bank accounts

This commit is contained in:
Hillel Coren 2022-11-09 09:00:08 +02:00
parent 2a0274247a
commit 1eb548dfd0
2 changed files with 13 additions and 10 deletions

View File

@ -73,8 +73,9 @@ class BankAccountListItem extends StatelessWidget {
style: Theme.of(context).textTheme.subtitle1,
),
),
Text(formatNumber(bankAccount.balance, context),
style: Theme.of(context).textTheme.subtitle1),
if (bankAccount.isConnected)
Text(formatNumber(bankAccount.balance, context),
style: Theme.of(context).textTheme.subtitle1),
],
),
),

View File

@ -115,14 +115,16 @@ class _BankAccountEditState extends State<BankAccountEdit> {
onSavePressed: (_) => _onSavePressed(),
keyboardType: TextInputType.text,
),
SizedBox(height: 16),
SwitchListTile(
activeColor: Theme.of(context).colorScheme.secondary,
title: Text(localization.autoSync),
value: bankAccount.autoSync,
onChanged: (value) => viewModel.onChanged(
bankAccount.rebuild((b) => b..autoSync = value)),
),
if (bankAccount.isConnected) ...[
SizedBox(height: 16),
SwitchListTile(
activeColor: Theme.of(context).colorScheme.secondary,
title: Text(localization.autoSync),
value: bankAccount.autoSync,
onChanged: (value) => viewModel.onChanged(
bankAccount.rebuild((b) => b..autoSync = value)),
),
],
],
),
],