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, style: Theme.of(context).textTheme.subtitle1,
), ),
), ),
Text(formatNumber(bankAccount.balance, context), if (bankAccount.isConnected)
style: Theme.of(context).textTheme.subtitle1), Text(formatNumber(bankAccount.balance, context),
style: Theme.of(context).textTheme.subtitle1),
], ],
), ),
), ),

View File

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