From 14b668d19e3849e1bced67e9b04d2e0ee969f036 Mon Sep 17 00:00:00 2001 From: CryptoFish <13164589+KingGorrin@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:54:44 +0100 Subject: [PATCH] Remove type step from pillar stepper --- .../pillars_stepper_container.dart | 73 +------------------ 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/lib/widgets/modular_widgets/pillars_widgets/pillars_stepper_container.dart b/lib/widgets/modular_widgets/pillars_widgets/pillars_stepper_container.dart index 49aea9f4..f6405a74 100644 --- a/lib/widgets/modular_widgets/pillars_widgets/pillars_stepper_container.dart +++ b/lib/widgets/modular_widgets/pillars_widgets/pillars_stepper_container.dart @@ -466,16 +466,6 @@ class _MainPillarsState extends State { ), context: context, ), - StepperUtils.getMaterialStep( - stepTitle: 'Pillar type', - stepContent: _getPillarTypeStepBody(), - stepSubtitle: _getPillarTypeStepSubtitle(), - stepState: StepperUtils.getStepState( - PillarsStepperStep.selectPillarType.index, - _lastCompletedStep?.index, - ), - context: context, - ), StepperUtils.getMaterialStep( stepTitle: '${kQsrCoin.symbol} management', stepContent: _getQsrManagementStep(context, accountInfo), @@ -512,15 +502,6 @@ class _MainPillarsState extends State { ); } - String _getPillarTypeStepSubtitle() { - switch (_selectedPillarType) { - case PillarType.regularPillar: - return 'Pillar'; - default: - return 'No Pillar type selected'; - } - } - Widget _getAmountSuffix(AccountInfo accountInfo) { return Row( children: [ @@ -928,59 +909,7 @@ class _MainPillarsState extends State { _iniStepperControllers(); }); } - - Widget _getPillarTypeStepBody() { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text( - 'Please choose the type of Pillar you want to register', - style: Theme.of(context).textTheme.headlineSmall, - ), - ], - ), - _getPillarTypeListTile('Pillar', PillarType.regularPillar), - _getContinueButton(), - ], - ); - } - - Widget _getContinueButton() { - return StepperButton( - onPressed: _selectedPillarType != null - ? () => _onPillarTypeContinuePressed() - : null, - text: 'Continue', - ); - } - - Widget _getPillarTypeListTile(String text, PillarType value) { - return ListTile( - title: Text( - text, - style: Theme.of(context).textTheme.bodyLarge, - ), - leading: Radio( - activeColor: AppColors.znnColor, - value: value, - groupValue: _selectedPillarType, - onChanged: (PillarType? value) { - setState(() { - _selectedPillarType = value; - _pillarsQsrInfoViewModel.getQsrManagementInfo( - _selectedPillarType, _addressController.text); - }); - }, - ), - ); - } - - void _onPillarTypeContinuePressed() { - _saveProgressAndNavigateToNextStep(PillarsStepperStep.selectPillarType); - } - + void _saveProgressAndNavigateToNextStep(PillarsStepperStep completedStep) { setState(() { _lastCompletedStep = completedStep;