From 9f044fb0c0001307f64017b7dd0885e47da60430 Mon Sep 17 00:00:00 2001 From: hawkbee1 Date: Thu, 20 Jun 2024 16:03:07 +0000 Subject: [PATCH] correct merge error --- .../drawer/src/view/drawer_page.dart | 247 +++++++++--------- 1 file changed, 123 insertions(+), 124 deletions(-) diff --git a/lib/dashboard/drawer/src/view/drawer_page.dart b/lib/dashboard/drawer/src/view/drawer_page.dart index 172a303e3..0751dad8f 100644 --- a/lib/dashboard/drawer/src/view/drawer_page.dart +++ b/lib/dashboard/drawer/src/view/drawer_page.dart @@ -50,155 +50,154 @@ class DrawerView extends StatelessWidget { 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), - ], - - if (profileModel - .profileSetting.settingsMenu.displayProfile) ...[ - DrawerCategoryItem( - title: l10n.walletProfiles, - subTitle: l10n.walletProfilesDescription, - onClick: () { - Navigator.of(context) - .push(PickProfileMenu.route()); - }, - ), - const SizedBox(height: Sizes.spaceSmall), - ], - + const DrawerLogo(), + const AppVersionDrawer(), + const SizedBox(height: Sizes.spaceLarge), + if (profileModel.profileType == ProfileType.enterprise) ...[ DrawerCategoryItem( - title: l10n.walletSecurity, - subTitle: l10n.walletSecurityDescription, - onClick: () { - Navigator.of(context) - .push(WalletSecurityMenu.route()); + 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.walletSettings, - subTitle: l10n.walletSettingsDescription, + title: l10n.walletProfiles, + subTitle: l10n.walletProfilesDescription, onClick: () { Navigator.of(context) - .push(WalletSettingsMenu.route()); + .push(PickProfileMenu.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, - 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, - ); - }, - ), + 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()); + }, ), - ), - 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), - ], + ], + ) + else + const SizedBox.shrink(), + const SizedBox(height: Sizes.spaceSmall), + if (profileModel.profileSetting.settingsMenu + .displaySelfSovereignIdentity) ...[ DrawerCategoryItem( - title: l10n.about, - subTitle: l10n.aboutDescription, + title: l10n.ssi, + subTitle: l10n.ssiDescription, onClick: () { - Navigator.of(context) - .push(AboutAltmeMenu.route()); + 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), + ], + + // 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.resetWallet, - subTitle: l10n.resetWalletDescription, + title: l10n.helpCenter, + subTitle: l10n.helpCenterDescription, onClick: () { Navigator.of(context) - .push(ResetWalletMenu.route()); + .push(HelpCenterMenu.route()); }, ), - const SizedBox(height: Sizes.spaceNormal), + const SizedBox(height: Sizes.spaceSmall), ], - ), + + 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), + ], ), ), ),