diff --git a/lib/dashboard/drawer/src/view/drawer_page.dart b/lib/dashboard/drawer/src/view/drawer_page.dart index 0751dad8f..0af25c4f5 100644 --- a/lib/dashboard/drawer/src/view/drawer_page.dart +++ b/lib/dashboard/drawer/src/view/drawer_page.dart @@ -43,161 +43,164 @@ class DrawerView extends StatelessWidget { child: SafeArea( child: Padding( padding: const EdgeInsets.symmetric(horizontal: 15), - child: ListView( - children: [ - const Align( - alignment: Alignment.topLeft, - child: BackLeadingButton( - padding: EdgeInsets.zero, + child: SingleChildScrollView( + child: Column( + children: [ + const Align( + alignment: Alignment.topLeft, + child: BackLeadingButton( + padding: EdgeInsets.zero, + ), ), - ), - const DrawerLogo(), - const AppVersionDrawer(), - const SizedBox(height: Sizes.spaceLarge), - if (profileModel.profileType == ProfileType.enterprise) ...[ - DrawerCategoryItem( - title: l10n.updateYourWalletConfigNow, - padding: const EdgeInsets.all(16), - onClick: () async { - Navigator.of(context).pop(); - await context - .read() - .updateTheConfiguration(); - }, - ), - const SizedBox(height: Sizes.spaceSmall), - ], + const DrawerLogo(), + const AppVersionDrawer(), + const SizedBox(height: Sizes.spaceLarge), + if (profileModel.profileType == + ProfileType.enterprise) ...[ + DrawerCategoryItem( + title: l10n.updateYourWalletConfigNow, + padding: const EdgeInsets.all(16), + onClick: () async { + Navigator.of(context).pop(); + await context + .read() + .updateTheConfiguration(); + }, + ), + const SizedBox(height: Sizes.spaceSmall), + ], + + if (profileModel + .profileSetting.settingsMenu.displayProfile) ...[ + DrawerCategoryItem( + title: l10n.walletProfiles, + subTitle: l10n.walletProfilesDescription, + onClick: () { + Navigator.of(context) + .push(PickProfileMenu.route()); + }, + ), + const SizedBox(height: Sizes.spaceSmall), + ], - if (profileModel - .profileSetting.settingsMenu.displayProfile) ...[ DrawerCategoryItem( - title: l10n.walletProfiles, - subTitle: l10n.walletProfilesDescription, + title: l10n.walletSecurity, + subTitle: l10n.walletSecurityDescription, onClick: () { Navigator.of(context) - .push(PickProfileMenu.route()); + .push(WalletSecurityMenu.route()); }, ), const SizedBox(height: Sizes.spaceSmall), - ], - - DrawerCategoryItem( - title: l10n.walletSecurity, - subTitle: l10n.walletSecurityDescription, - onClick: () { - Navigator.of(context) - .push(WalletSecurityMenu.route()); - }, - ), - const SizedBox(height: Sizes.spaceSmall), - DrawerCategoryItem( - title: l10n.walletSettings, - subTitle: l10n.walletSettingsDescription, - onClick: () { - Navigator.of(context) - .push(WalletSettingsMenu.route()); - }, - ), - if (Parameters.walletHandlesCrypto) - Column( - children: [ - const SizedBox(height: Sizes.spaceSmall), - DrawerCategoryItem( - title: l10n.blockchainSettings, - subTitle: l10n.blockchainSettingsDescription, - onClick: () { - Navigator.of(context) - .push(BlockchainSettingsMenu.route()); - }, - ), - ], - ) - else - const SizedBox.shrink(), - const SizedBox(height: Sizes.spaceSmall), - - if (profileModel.profileSetting.settingsMenu - .displaySelfSovereignIdentity) ...[ DrawerCategoryItem( - title: l10n.ssi, - subTitle: l10n.ssiDescription, + title: l10n.walletSettings, + subTitle: l10n.walletSettingsDescription, onClick: () { - Navigator.of(context).push(SSIMenu.route()); + Navigator.of(context) + .push(WalletSettingsMenu.route()); }, ), + if (Parameters.walletHandlesCrypto) + Column( + children: [ + const SizedBox(height: Sizes.spaceSmall), + DrawerCategoryItem( + title: l10n.blockchainSettings, + subTitle: l10n.blockchainSettingsDescription, + onClick: () { + Navigator.of(context) + .push(BlockchainSettingsMenu.route()); + }, + ), + ], + ) + else + const SizedBox.shrink(), const SizedBox(height: Sizes.spaceSmall), - ], - if (profileModel - .profileSetting.settingsMenu.displayDeveloperMode) ...[ - DrawerCategoryItem( - title: l10n.developerMode, - subTitle: l10n.developerModeSubtitle, - trailing: SizedBox( - height: 25, - child: BlocBuilder( - builder: (context, state) { - return Switch( - key: const Key('developerMode'), - onChanged: (value) async { - await profileCubit.setDeveloperModeStatus( - enabled: value, - ); - }, - value: state.model.isDeveloperMode, - activeColor: - Theme.of(context).colorScheme.primary, - ); - }, + if (profileModel.profileSetting.settingsMenu + .displaySelfSovereignIdentity) ...[ + DrawerCategoryItem( + title: l10n.ssi, + subTitle: l10n.ssiDescription, + onClick: () { + Navigator.of(context).push(SSIMenu.route()); + }, + ), + const SizedBox(height: Sizes.spaceSmall), + ], + + if (profileModel.profileSetting.settingsMenu + .displayDeveloperMode) ...[ + DrawerCategoryItem( + title: l10n.developerMode, + subTitle: l10n.developerModeSubtitle, + trailing: SizedBox( + height: 25, + child: BlocBuilder( + builder: (context, state) { + return Switch( + key: const Key('developerMode'), + onChanged: (value) async { + await profileCubit.setDeveloperModeStatus( + enabled: value, + ); + }, + value: state.model.isDeveloperMode, + activeColor: + Theme.of(context).colorScheme.primary, + ); + }, + ), ), ), - ), - const SizedBox(height: Sizes.spaceSmall), - ], + const SizedBox(height: Sizes.spaceSmall), + ], + + // DrawerCategoryItem( + // title: l10n.checkLinkedinProfile, + // subTitle: l10n.checkLinkedinProfile, + // onClick: () { + // Navigator.of(context) + // .push(CheckForLinkedInProfile.route()); + // }, + // ), + //const SizedBox(height: Sizes.spaceSmall), - // DrawerCategoryItem( - // title: l10n.checkLinkedinProfile, - // subTitle: l10n.checkLinkedinProfile, - // onClick: () { - // Navigator.of(context) - // .push(CheckForLinkedInProfile.route()); - // }, - // ), - //const SizedBox(height: Sizes.spaceSmall), + if (profileModel + .profileSetting.settingsMenu.displayHelpCenter) ...[ + DrawerCategoryItem( + title: l10n.helpCenter, + subTitle: l10n.helpCenterDescription, + onClick: () { + Navigator.of(context) + .push(HelpCenterMenu.route()); + }, + ), + const SizedBox(height: Sizes.spaceSmall), + ], - if (profileModel - .profileSetting.settingsMenu.displayHelpCenter) ...[ DrawerCategoryItem( - title: l10n.helpCenter, - subTitle: l10n.helpCenterDescription, + title: l10n.about, + subTitle: l10n.aboutDescription, onClick: () { Navigator.of(context) - .push(HelpCenterMenu.route()); + .push(AboutAltmeMenu.route()); }, ), const SizedBox(height: Sizes.spaceSmall), + DrawerCategoryItem( + title: l10n.resetWallet, + subTitle: l10n.resetWalletDescription, + onClick: () { + Navigator.of(context) + .push(ResetWalletMenu.route()); + }, + ), + const SizedBox(height: Sizes.spaceNormal), ], - - DrawerCategoryItem( - title: l10n.about, - subTitle: l10n.aboutDescription, - onClick: () { - Navigator.of(context) - .push(AboutAltmeMenu.route()); - }, - ), - const SizedBox(height: Sizes.spaceSmall), - DrawerCategoryItem( - title: l10n.resetWallet, - subTitle: l10n.resetWalletDescription, - onClick: () { - Navigator.of(context) - .push(ResetWalletMenu.route()); - }, - ), - const SizedBox(height: Sizes.spaceNormal), - ], + ), ), ), ), diff --git a/lib/dashboard/drawer/wallet_settings/view/wallet_settings_menu.dart b/lib/dashboard/drawer/wallet_settings/view/wallet_settings_menu.dart index e0e397ce7..4c07cd35c 100644 --- a/lib/dashboard/drawer/wallet_settings/view/wallet_settings_menu.dart +++ b/lib/dashboard/drawer/wallet_settings/view/wallet_settings_menu.dart @@ -10,7 +10,7 @@ class WalletSettingsMenu extends StatelessWidget { static Route route() { return MaterialPageRoute( - settings: const RouteSettings(name: '/LanguageSettings'), + settings: const RouteSettings(name: '/WalletSettingsMenu'), builder: (_) => const WalletSettingsMenu(), ); } diff --git a/test/dashboard/drawer/src/view/drawer_page_test.dart b/test/dashboard/drawer/src/view/drawer_page_test.dart index c36bc5d02..71011e59e 100644 --- a/test/dashboard/drawer/src/view/drawer_page_test.dart +++ b/test/dashboard/drawer/src/view/drawer_page_test.dart @@ -124,7 +124,7 @@ void main() { ); expect(find.text('Wallet Settings'), findsOneWidget); - expect(find.text('Choose your language'), findsOneWidget); + expect(find.text('Choose your language and theme'), findsOneWidget); await tester.tap(find.text('Wallet Settings')); await tester.pumpAndSettle();