diff --git a/lib/ui/company_gateway/company_gateway_screen.dart b/lib/ui/company_gateway/company_gateway_screen.dart index 231838443..8c1a524bd 100644 --- a/lib/ui/company_gateway/company_gateway_screen.dart +++ b/lib/ui/company_gateway/company_gateway_screen.dart @@ -78,7 +78,6 @@ class CompanyGatewayScreen extends StatelessWidget { SaveCancelButtons( isSaving: state.isSaving, onSavePressed: viewModel.onSavePressed, - onCancelPressed: viewModel.onCancelPressed, ), ], body: CompanyGatewayListBuilder(), diff --git a/lib/ui/company_gateway/company_gateway_screen_vm.dart b/lib/ui/company_gateway/company_gateway_screen_vm.dart index a4ee7b4f6..8771fb62c 100644 --- a/lib/ui/company_gateway/company_gateway_screen_vm.dart +++ b/lib/ui/company_gateway/company_gateway_screen_vm.dart @@ -40,7 +40,6 @@ class CompanyGatewayScreenVM { @required this.userCompany, @required this.companyGatewayMap, @required this.onSavePressed, - @required this.onCancelPressed, }); final bool isInMultiselect; @@ -48,7 +47,6 @@ class CompanyGatewayScreenVM { final List companyGatewayList; final BuiltMap companyGatewayMap; final Function(BuildContext) onSavePressed; - final Function(BuildContext) onCancelPressed; static CompanyGatewayScreenVM fromStore(Store store) { final state = store.state; @@ -64,7 +62,6 @@ class CompanyGatewayScreenVM { ), userCompany: state.userCompany, isInMultiselect: state.companyGatewayListState.isInMultiselect(), - onCancelPressed: (context) => store.dispatch(ResetSettings()), onSavePressed: (context) { final settingsUIState = state.uiState.settingsUIState; switch (settingsUIState.entityType) { diff --git a/lib/ui/settings/tax_settings.dart b/lib/ui/settings/tax_settings.dart index f77c6c57e..66966e82b 100644 --- a/lib/ui/settings/tax_settings.dart +++ b/lib/ui/settings/tax_settings.dart @@ -36,7 +36,6 @@ class _TaxSettingsState extends State { return SettingsScaffold( title: localization.taxSettings, onSavePressed: viewModel.onSavePressed, - onCancelPressed: viewModel.onCancelPressed, body: AppForm( formKey: _formKey, children: [ diff --git a/lib/ui/settings/tax_settings_vm.dart b/lib/ui/settings/tax_settings_vm.dart index 24023c501..2404de09d 100644 --- a/lib/ui/settings/tax_settings_vm.dart +++ b/lib/ui/settings/tax_settings_vm.dart @@ -36,7 +36,6 @@ class TaxSettingsVM { @required this.onSettingsChanged, @required this.onCompanyChanged, @required this.onSavePressed, - @required this.onCancelPressed, @required this.onConfigureRatesPressed, }); @@ -50,10 +49,6 @@ class TaxSettingsVM { onSettingsChanged: (settings) { store.dispatch(UpdateSettings(settings: settings)); }, - onCancelPressed: (context) { - print('## onCancelPressed ##'); - store.dispatch(ViewSettings(context: context)); - }, onCompanyChanged: (company) => store.dispatch(UpdateCompany(company: company)), onSavePressed: (context) { @@ -77,7 +72,6 @@ class TaxSettingsVM { final AppState state; final Function(BuildContext) onSavePressed; - final Function(BuildContext) onCancelPressed; final SettingsEntity settings; final Function(SettingsEntity) onSettingsChanged; final CompanyEntity company;