diff --git a/lib/app/shared/enum/type/profile/profile_type.dart b/lib/app/shared/enum/type/profile/profile_type.dart index bdd936c27..3cdefa9e6 100644 --- a/lib/app/shared/enum/type/profile/profile_type.dart +++ b/lib/app/shared/enum/type/profile/profile_type.dart @@ -8,7 +8,10 @@ enum ProfileType { } extension ProfileTypeX on ProfileType { - String getTitle(AppLocalizations l10n) { + String getTitle({ + required AppLocalizations l10n, + String? name, + }) { switch (this) { case ProfileType.custom: return l10n.profileCustom; @@ -17,7 +20,7 @@ extension ProfileTypeX on ProfileType { case ProfileType.dutch: return l10n.profileDutchBlockchainCoalition; case ProfileType.enterprise: - return 'Enterprise'; + return name ?? 'Enterprise'; } } } diff --git a/lib/dashboard/drawer/profile/widget/profile_selector_widget.dart b/lib/dashboard/drawer/profile/widget/profile_selector_widget.dart index 943d3695b..88418fab1 100644 --- a/lib/dashboard/drawer/profile/widget/profile_selector_widget.dart +++ b/lib/dashboard/drawer/profile/widget/profile_selector_widget.dart @@ -51,8 +51,12 @@ class ProfileSelectorWidget extends StatelessWidget { itemBuilder: (context, index) { final profileType = ProfileType.values[index]; - if (context.read().state.model.walletType != - WalletType.enterprise && + final profile = context.read().state.model; + + final isEnterprise = + profile.walletType == WalletType.enterprise; + + if (!isEnterprise && profileType == ProfileType.enterprise) { return Container(); } @@ -81,7 +85,13 @@ class ProfileSelectorWidget extends StatelessWidget { ), ), title: Text( - profileType.getTitle(l10n), + profileType.getTitle( + l10n: l10n, + name: isEnterprise + ? profile.profileSetting.generalOptions + .companyName + : null, + ), style: Theme.of(context) .textTheme .bodyLarge diff --git a/lib/dashboard/drawer/src/view/drawer_page.dart b/lib/dashboard/drawer/src/view/drawer_page.dart index 63f08c567..26d75966f 100644 --- a/lib/dashboard/drawer/src/view/drawer_page.dart +++ b/lib/dashboard/drawer/src/view/drawer_page.dart @@ -21,6 +21,9 @@ class DrawerView extends StatelessWidget { @override Widget build(BuildContext context) { final l10n = context.l10n; + + final profileSetting = + context.read().state.model.profileSetting; return SizedBox( width: MediaQuery.of(context).size.width, child: Drawer( @@ -37,7 +40,17 @@ class DrawerView extends StatelessWidget { color: Theme.of(context).colorScheme.onPrimary, ), ), - const Center(child: AltMeLogo(size: 90)), + + Center( + child: profileSetting.generalOptions.companyLogo.isNotEmpty + ? CachedImageFromNetwork( + profileSetting.generalOptions.companyLogo, + fit: BoxFit.contain, + height: 90, + width: 90, + ) + : const AltMeLogo(size: 90), + ), const SizedBox(height: Sizes.spaceSmall), const AppVersionDrawer(), const SizedBox(height: Sizes.spaceLarge),