Transactions

This commit is contained in:
Hillel Coren 2022-09-22 21:32:34 +03:00
parent 6469d0f6a0
commit e44b32a980
3 changed files with 9 additions and 12 deletions

View File

@ -31,7 +31,6 @@ class ListScaffold extends StatelessWidget {
this.onHamburgerLongPress, this.onHamburgerLongPress,
this.onCancelSettingsSection, this.onCancelSettingsSection,
this.onCancelSettingsIndex = 0, this.onCancelSettingsIndex = 0,
this.createLabel,
}); });
final EntityType entityType; final EntityType entityType;
@ -45,7 +44,6 @@ class ListScaffold extends StatelessWidget {
final String onCancelSettingsSection; final String onCancelSettingsSection;
final int onCancelSettingsIndex; final int onCancelSettingsIndex;
final Function onCheckboxPressed; final Function onCheckboxPressed;
final String createLabel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -76,7 +74,7 @@ class ListScaffold extends StatelessWidget {
); );
} else if (entityType != null && entityType != EntityType.settings) { } else if (entityType != null && entityType != EntityType.settings) {
leading = Padding( leading = Padding(
padding: const EdgeInsets.only(left: 16, right: 12), padding: const EdgeInsets.only(left: 16, right: 14),
child: OutlinedButton( child: OutlinedButton(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: MaterialStateProperty.all( backgroundColor: MaterialStateProperty.all(
@ -85,7 +83,7 @@ class ListScaffold extends StatelessWidget {
createEntityByType(entityType: entityType, context: context); createEntityByType(entityType: entityType, context: context);
}, },
child: IconText( child: IconText(
text: createLabel ?? localization.create, text: localization.create,
icon: Icons.add, icon: Icons.add,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),

View File

@ -66,7 +66,6 @@ class BankAccountScreen extends StatelessWidget {
return ListScaffold( return ListScaffold(
entityType: EntityType.bankAccount, entityType: EntityType.bankAccount,
onHamburgerLongPress: () => store.dispatch(StartBankAccountMultiselect()), onHamburgerLongPress: () => store.dispatch(StartBankAccountMultiselect()),
createLabel: localization.connect,
appBarTitle: ListFilter( appBarTitle: ListFilter(
key: ValueKey( key: ValueKey(
'__filter_${state.bankAccountListState.filterClearedAt}__'), '__filter_${state.bankAccountListState.filterClearedAt}__'),
@ -90,7 +89,7 @@ class BankAccountScreen extends StatelessWidget {
body: Column( body: Column(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 20), padding: const EdgeInsets.symmetric(horizontal: 16),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(

View File

@ -259,7 +259,7 @@ class _MatchDepositsState extends State<_MatchDeposits> {
Expanded( Expanded(
child: Padding( child: Padding(
padding: padding:
const EdgeInsets.symmetric(horizontal: 20, vertical: 4), const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -352,7 +352,7 @@ class _MatchDepositsState extends State<_MatchDeposits> {
), ),
if (_selectedInvoices.isNotEmpty) if (_selectedInvoices.isNotEmpty)
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12), padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Text( child: Text(
'${_selectedInvoices.length} ${localization.selected}${formatNumber(totalSelected, context, currencyId: currencyId)}', '${_selectedInvoices.length} ${localization.selected}${formatNumber(totalSelected, context, currencyId: currencyId)}',
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -362,9 +362,9 @@ class _MatchDepositsState extends State<_MatchDeposits> {
ListDivider(), ListDivider(),
Padding( Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 20, left: 16,
bottom: 18, bottom: 18,
right: 20, right: 16,
), ),
child: AppButton( child: AppButton(
label: localization.convertToPayment, label: localization.convertToPayment,
@ -605,9 +605,9 @@ class _MatchWithdrawalsState extends State<_MatchWithdrawals> {
ListDivider(), ListDivider(),
Padding( Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 20, left: 16,
bottom: 16, bottom: 16,
right: 20, right: 16,
), ),
child: AppButton( child: AppButton(
label: localization.convertToExpense, label: localization.convertToExpense,