diff --git a/assets/images/ic_add_identity.svg b/assets/images/ic_add_identity.svg
new file mode 100644
index 000000000..c9aa064e1
--- /dev/null
+++ b/assets/images/ic_add_identity.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/ic_dropdown.svg b/assets/images/ic_dropdown.svg
new file mode 100644
index 000000000..03b459774
--- /dev/null
+++ b/assets/images/ic_dropdown.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/ic_email.svg b/assets/images/ic_email.svg
new file mode 100644
index 000000000..44f59957e
--- /dev/null
+++ b/assets/images/ic_email.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/ic_more_vertical.svg b/assets/images/ic_more_vertical.svg
new file mode 100644
index 000000000..44e3006ca
--- /dev/null
+++ b/assets/images/ic_more_vertical.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/ic_reply_to.svg b/assets/images/ic_reply_to.svg
new file mode 100644
index 000000000..52cfb2ed5
--- /dev/null
+++ b/assets/images/ic_reply_to.svg
@@ -0,0 +1,3 @@
+
diff --git a/core/lib/presentation/extensions/color_extension.dart b/core/lib/presentation/extensions/color_extension.dart
index d61619efa..aba28abd4 100644
--- a/core/lib/presentation/extensions/color_extension.dart
+++ b/core/lib/presentation/extensions/color_extension.dart
@@ -107,6 +107,7 @@ extension AppColor on Color {
static const colorAvatar = Color(0xFFDE5E5E);
static const colorFocusButton = Color(0x14818C99);
static const colorBorderEmailAddressInvalid = Color(0xFFFF3347);
+ static const colorBorderIdentityInfo = Color(0xFFE7E8EC);
static const colorBgMailboxSelected = Color(0xFF99E4E8EC);
static const colorLoading = Color(0x2999A2AD);
static const colorActionButtonHover = Color(0xFFA2AAB3);
diff --git a/core/lib/presentation/resources/image_paths.dart b/core/lib/presentation/resources/image_paths.dart
index e2525419a..b992c096c 100644
--- a/core/lib/presentation/resources/image_paths.dart
+++ b/core/lib/presentation/resources/image_paths.dart
@@ -95,6 +95,11 @@ class ImagePaths {
String get icLogout => _getImagePath('ic_logout.svg');
String get icSetting => _getImagePath('ic_setting.svg');
String get icProfiles => _getImagePath('ic_profiles.svg');
+ String get icAddIdentity => _getImagePath('ic_add_identity.svg');
+ String get icDropDown => _getImagePath('ic_dropdown.svg');
+ String get icMoreVertical => _getImagePath('ic_more_vertical.svg');
+ String get icEmail => _getImagePath('ic_email.svg');
+ String get icReplyTo => _getImagePath('ic_reply_to.svg');
String _getImagePath(String imageName) {
return AssetsPaths.images + imageName;
diff --git a/lib/features/base/reloadable/reloadable_controller.dart b/lib/features/base/reloadable/reloadable_controller.dart
index adbbd8ecd..efb3a0a67 100644
--- a/lib/features/base/reloadable/reloadable_controller.dart
+++ b/lib/features/base/reloadable/reloadable_controller.dart
@@ -102,8 +102,4 @@ abstract class ReloadableController extends BaseController {
_clearAllCacheAction();
goToLogin();
}
-
- void goToSettings() {
- push(AppRoutes.MANAGE_ACCOUNT);
- }
}
\ No newline at end of file
diff --git a/lib/features/mailbox_dashboard/presentation/mailbox_dashboard_controller.dart b/lib/features/mailbox_dashboard/presentation/mailbox_dashboard_controller.dart
index e588ca0ce..e64d61972 100644
--- a/lib/features/mailbox_dashboard/presentation/mailbox_dashboard_controller.dart
+++ b/lib/features/mailbox_dashboard/presentation/mailbox_dashboard_controller.dart
@@ -35,6 +35,7 @@ import 'package:tmail_ui_user/features/mailbox_dashboard/domain/state/remove_ema
import 'package:tmail_ui_user/features/mailbox_dashboard/domain/usecases/get_user_profile_interactor.dart';
import 'package:tmail_ui_user/features/mailbox_dashboard/domain/usecases/remove_email_drafts_interactor.dart';
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/action/dashboard_action.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/model/manage_account_arguments.dart';
import 'package:tmail_ui_user/features/thread/domain/model/search_query.dart';
import 'package:tmail_ui_user/features/thread/domain/state/search_email_state.dart';
import 'package:tmail_ui_user/features/thread/presentation/model/search_state.dart';
@@ -422,6 +423,11 @@ class MailboxDashBoardController extends ReloadableController {
dashBoardAction.value = DashBoardAction.idle;
}
+ void goToSettings() {
+ push(AppRoutes.MANAGE_ACCOUNT,
+ arguments: ManageAccountArguments(accountId.value, userProfile.value));
+ }
+
@override
void onClose() {
_emailReceiveManager.closeEmailReceiveManagerStream();
diff --git a/lib/features/mailbox_dashboard/presentation/mixin/user_setting_popup_menu_mixin.dart b/lib/features/mailbox_dashboard/presentation/mixin/user_setting_popup_menu_mixin.dart
index b66b602af..a5ea0a517 100644
--- a/lib/features/mailbox_dashboard/presentation/mixin/user_setting_popup_menu_mixin.dart
+++ b/lib/features/mailbox_dashboard/presentation/mixin/user_setting_popup_menu_mixin.dart
@@ -15,11 +15,11 @@ mixin UserSettingPopupMenuMixin {
enabled: false,
padding: EdgeInsets.zero,
child: _userInformation(context, userProfile)),
- PopupMenuDivider(height: 0.5),
+ const PopupMenuDivider(height: 0.5),
PopupMenuItem(
padding: EdgeInsets.zero,
child: _settingAction(context, onSettingAction)),
- PopupMenuDivider(height: 0.5),
+ const PopupMenuDivider(height: 0.5),
PopupMenuItem(
padding: EdgeInsets.zero,
child: _logoutAction(context, onLogoutAction)),
@@ -31,14 +31,14 @@ mixin UserSettingPopupMenuMixin {
return SizedBox(
width: 300,
child: ListTile(
- contentPadding: EdgeInsets.symmetric(horizontal: 20),
- title: Text(userProfile.email, maxLines: 1, style: TextStyle(
+ contentPadding: const EdgeInsets.symmetric(horizontal: 20),
+ title: Text(userProfile.email, maxLines: 1, style: const TextStyle(
fontSize: 15,
color: AppColor.colorHintSearchBar,
fontWeight: FontWeight.normal))),
);
}
- return SizedBox.shrink();
+ return const SizedBox.shrink();
}
Widget _settingAction(BuildContext context, Function? onCallBack) {
diff --git a/lib/features/manage_account/presentation/account_properties/profiles/identities/identities_bindings.dart b/lib/features/manage_account/presentation/account_properties/profiles/identities/identities_bindings.dart
deleted file mode 100644
index a7ee750be..000000000
--- a/lib/features/manage_account/presentation/account_properties/profiles/identities/identities_bindings.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-import 'package:get/get.dart';
-import 'package:tmail_ui_user/features/base/base_bindings.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/account_properties/profiles/identities/identities_controller.dart';
-
-class IdentitiesBindings extends BaseBindings {
-
- @override
- void bindingsController() {
- Get.lazyPut(() => IdentitiesController());
- }
-
- @override
- void bindingsDataSource() {
- }
-
- @override
- void bindingsDataSourceImpl() {
- }
-
- @override
- void bindingsInteractor() {
- }
-
- @override
- void bindingsRepository() {
- }
-
- @override
- void bindingsRepositoryImpl() {
- }
-}
\ No newline at end of file
diff --git a/lib/features/manage_account/presentation/account_properties/profiles/identities/identities_view.dart b/lib/features/manage_account/presentation/account_properties/profiles/identities/identities_view.dart
deleted file mode 100644
index 8ab722a35..000000000
--- a/lib/features/manage_account/presentation/account_properties/profiles/identities/identities_view.dart
+++ /dev/null
@@ -1,17 +0,0 @@
-
-import 'package:core/core.dart';
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/account_properties/profiles/identities/identities_controller.dart';
-
-class IdentitiesView extends GetWidget {
-
- final _responsiveUtils = Get.find();
-
- IdentitiesView({Key? key}) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- return Container(color: Colors.green);
- }
-}
\ No newline at end of file
diff --git a/lib/features/manage_account/presentation/account_properties/profiles/profiles_controller.dart b/lib/features/manage_account/presentation/account_properties/profiles/profiles_controller.dart
deleted file mode 100644
index 2f5761408..000000000
--- a/lib/features/manage_account/presentation/account_properties/profiles/profiles_controller.dart
+++ /dev/null
@@ -1,17 +0,0 @@
-
-import 'package:get/get.dart';
-import 'package:tmail_ui_user/features/base/base_controller.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/model/profiles_tab_type.dart';
-
-class ProfilesController extends BaseController {
-
- final tabTypeSelected = ProfilesTabType.identities.obs;
-
- @override
- void onDone() {
- }
-
- @override
- void onError(error) {
- }
-}
\ No newline at end of file
diff --git a/lib/features/manage_account/presentation/dashboard/manage_account_dashboard_controller.dart b/lib/features/manage_account/presentation/dashboard/manage_account_dashboard_controller.dart
deleted file mode 100644
index 678a91556..000000000
--- a/lib/features/manage_account/presentation/dashboard/manage_account_dashboard_controller.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-import 'package:model/model.dart';
-import 'package:package_info_plus/package_info_plus.dart';
-import 'package:tmail_ui_user/features/base/reloadable/reloadable_controller.dart';
-import 'package:tmail_ui_user/features/mailbox_dashboard/domain/state/get_user_profile_state.dart';
-import 'package:tmail_ui_user/features/mailbox_dashboard/domain/usecases/get_user_profile_interactor.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/model/account_property.dart';
-
-class ManageAccountDashBoardController extends ReloadableController {
-
- final GetUserProfileInteractor _getUserProfileInteractor;
-
- final menuDrawerKey = GlobalKey();
-
- final appInformation = Rxn();
- final userProfile = Rxn();
- final accountPropertySelected = AccountProperty.profiles.obs;
-
- ManageAccountDashBoardController(
- this._getUserProfileInteractor,
- );
-
- @override
- void onReady() {
- _getUserProfile();
- super.onReady();
- }
-
- @override
- void onDone() {
- viewState.value.fold(
- (failure) {},
- (success) {
- if (success is GetUserProfileSuccess) {
- userProfile.value = success.userProfile;
- }
- }
- );
- }
-
- @override
- void onError(error) {
- }
-
- void _getUserProfile() async {
- consumeState(_getUserProfileInteractor.execute());
- }
-
- void openMenuDrawer() {
- menuDrawerKey.currentState?.openDrawer();
- }
-
- void closeMenuDrawer() {
- menuDrawerKey.currentState?.openEndDrawer();
- }
-
- bool get isMenuDrawerOpen => menuDrawerKey.currentState?.isDrawerOpen == true;
-}
\ No newline at end of file
diff --git a/lib/features/manage_account/presentation/dashboard/manage_account_dashboard_bindings.dart b/lib/features/manage_account/presentation/manage_account_dashboard_bindings.dart
similarity index 91%
rename from lib/features/manage_account/presentation/dashboard/manage_account_dashboard_bindings.dart
rename to lib/features/manage_account/presentation/manage_account_dashboard_bindings.dart
index 1e96bfe10..370058554 100644
--- a/lib/features/manage_account/presentation/dashboard/manage_account_dashboard_bindings.dart
+++ b/lib/features/manage_account/presentation/manage_account_dashboard_bindings.dart
@@ -2,9 +2,9 @@ import 'package:get/get.dart';
import 'package:tmail_ui_user/features/base/base_bindings.dart';
import 'package:tmail_ui_user/features/login/domain/repository/credential_repository.dart';
import 'package:tmail_ui_user/features/mailbox_dashboard/domain/usecases/get_user_profile_interactor.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/account_properties/profiles/profiles_bindings.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/dashboard/manage_account_dashboard_controller.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/manage_account_dashboard_controller.dart';
import 'package:tmail_ui_user/features/manage_account/presentation/menu/manage_account_menu_bindings.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/profiles/profiles_bindings.dart';
class ManageAccountDashBoardBindings extends BaseBindings {
diff --git a/lib/features/manage_account/presentation/manage_account_dashboard_controller.dart b/lib/features/manage_account/presentation/manage_account_dashboard_controller.dart
new file mode 100644
index 000000000..da31a7399
--- /dev/null
+++ b/lib/features/manage_account/presentation/manage_account_dashboard_controller.dart
@@ -0,0 +1,101 @@
+
+import 'package:core/core.dart';
+import 'package:flutter/foundation.dart';
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:jmap_dart_client/jmap/account_id.dart';
+import 'package:jmap_dart_client/jmap/core/session/session.dart';
+import 'package:model/model.dart';
+import 'package:package_info_plus/package_info_plus.dart';
+import 'package:tmail_ui_user/features/base/reloadable/reloadable_controller.dart';
+import 'package:tmail_ui_user/features/mailbox_dashboard/domain/state/get_user_profile_state.dart';
+import 'package:tmail_ui_user/features/mailbox_dashboard/domain/usecases/get_user_profile_interactor.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/model/account_menu_item.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/model/manage_account_arguments.dart';
+import 'package:tmail_ui_user/main/routes/app_routes.dart';
+import 'package:tmail_ui_user/main/routes/route_navigation.dart';
+
+class ManageAccountDashBoardController extends ReloadableController {
+
+ final _responsiveUtils = Get.find();
+
+ final GetUserProfileInteractor _getUserProfileInteractor;
+
+ final menuDrawerKey = GlobalKey();
+
+ final appInformation = Rxn();
+ final userProfile = Rxn();
+ final accountId = Rxn();
+ final accountMenuItemSelected = AccountMenuItem.profiles.obs;
+
+ ManageAccountDashBoardController(
+ this._getUserProfileInteractor,
+ );
+
+ @override
+ void onReady() {
+ _getArguments();
+ super.onReady();
+ }
+
+ @override
+ void onDone() {
+ viewState.value.fold(
+ (failure) {},
+ (success) {
+ if (success is GetUserProfileSuccess) {
+ userProfile.value = success.userProfile;
+ }
+ }
+ );
+ }
+
+ @override
+ void onError(error) {
+ }
+
+ @override
+ void handleReloaded(Session session) {
+ accountId.value = session.accounts.keys.first;
+ _getUserProfile();
+ }
+
+ void _getArguments() {
+ final arguments = Get.arguments;
+ log('ManageAccountDashBoardController::_getAccountIdAndUserProfile(): $arguments');
+ if (arguments is ManageAccountArguments) {
+ accountId.value = arguments.accountId;
+ userProfile.value = arguments.userProfile;
+ } else {
+ if (kIsWeb) {
+ reload();
+ }
+ }
+ }
+
+ void _getUserProfile() async {
+ consumeState(_getUserProfileInteractor.execute());
+ }
+
+ void openMenuDrawer() {
+ menuDrawerKey.currentState?.openDrawer();
+ }
+
+ void closeMenuDrawer() {
+ menuDrawerKey.currentState?.openEndDrawer();
+ }
+
+ bool get isMenuDrawerOpen => menuDrawerKey.currentState?.isDrawerOpen == true;
+
+ void selectAccountMenuItem(AccountMenuItem newAccountMenuItem) {
+ accountMenuItemSelected.value = newAccountMenuItem;
+ if (currentContext != null && !_responsiveUtils.isDesktop(currentContext!)) {
+ closeMenuDrawer();
+ }
+ }
+
+ void goToSettings() {
+ pushAndPop(AppRoutes.MANAGE_ACCOUNT,
+ arguments: ManageAccountArguments(accountId.value, userProfile.value));
+ }
+}
\ No newline at end of file
diff --git a/lib/features/manage_account/presentation/dashboard/manage_account_dashboard_view.dart b/lib/features/manage_account/presentation/manage_account_dashboard_view.dart
similarity index 93%
rename from lib/features/manage_account/presentation/dashboard/manage_account_dashboard_view.dart
rename to lib/features/manage_account/presentation/manage_account_dashboard_view.dart
index 0debeae8f..6587d3a33 100644
--- a/lib/features/manage_account/presentation/dashboard/manage_account_dashboard_view.dart
+++ b/lib/features/manage_account/presentation/manage_account_dashboard_view.dart
@@ -4,10 +4,10 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/mixin/user_setting_popup_menu_mixin.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/account_properties/profiles/profiles_view.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/dashboard/manage_account_dashboard_controller.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/manage_account_dashboard_controller.dart';
import 'package:tmail_ui_user/features/manage_account/presentation/menu/manage_account_menu_view.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/model/account_property.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/model/account_menu_item.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/profiles/profiles_view.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
@@ -73,7 +73,7 @@ class ManageAccountDashBoardView extends GetWidget {}))
.build(),
const SizedBox(width: 16),
- (AvatarBuilder()
+ Obx(() => (AvatarBuilder()
..text(controller.userProfile.value?.getAvatarText() ?? '')
..backgroundColor(Colors.white)
..textColor(Colors.black)
@@ -121,7 +121,7 @@ class ManageAccountDashBoardView extends GetWidget();
- final listAccountProperties = [
- AccountProperty.profiles
+ final listAccountMenuItem = [
+ AccountMenuItem.profiles
];
@override
@@ -19,4 +19,8 @@ class ManageAccountMenuController extends BaseController {
@override
void onError(error) {
}
+
+ void selectAccountMenuItem(AccountMenuItem newAccountMenuItem) {
+ dashBoardController.selectAccountMenuItem(newAccountMenuItem);
+ }
}
\ No newline at end of file
diff --git a/lib/features/manage_account/presentation/menu/manage_account_menu_view.dart b/lib/features/manage_account/presentation/menu/manage_account_menu_view.dart
index ba867636d..59ec21467 100644
--- a/lib/features/manage_account/presentation/menu/manage_account_menu_view.dart
+++ b/lib/features/manage_account/presentation/menu/manage_account_menu_view.dart
@@ -65,23 +65,29 @@ class ManageAccountMenuView extends GetWidget {
padding: const EdgeInsets.only(left: 16, right: 8),
key: const Key('list_manage_account_property'),
shrinkWrap: true,
- itemCount: controller.listAccountProperties.length,
- itemBuilder: (context, index) => Obx(() => AccountPropertyTileBuilder(
+ itemCount: controller.listAccountMenuItem.length,
+ itemBuilder: (context, index) => Obx(() => AccountMenuItemTileBuilder(
context,
_imagePaths,
_responsiveUtils,
- controller.listAccountProperties[index],
- controller.dashBoardController.accountPropertySelected.value))),
+ controller.listAccountMenuItem[index],
+ controller.dashBoardController.accountMenuItemSelected.value,
+ onSelectAccountMenuItemAction: (newAccountMenuItem) =>
+ controller.selectAccountMenuItem(newAccountMenuItem)))),
const Padding(
padding: EdgeInsets.symmetric(vertical: 16),
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
Padding(padding: const EdgeInsets.only(left: 32),
- child: InkWell(child: Row(children: [
- SvgPicture.asset(_imagePaths.icLogout, fit: BoxFit.fill),
- const SizedBox(width: 12),
- Expanded(child: Text(AppLocalizations.of(context).sign_out,
- style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: Colors.black)))
- ]))),
+ child: InkWell(
+ onTap: () => controller.dashBoardController.logoutAction(),
+ child: Row(children: [
+ SvgPicture.asset(_imagePaths.icLogout, fit: BoxFit.fill),
+ const SizedBox(width: 12),
+ Expanded(child: Text(AppLocalizations.of(context).sign_out,
+ style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: Colors.black)))
+ ])
+ )
+ ),
]),
)),
]
diff --git a/lib/features/manage_account/presentation/menu/widgets/account_property_tile_builder.dart b/lib/features/manage_account/presentation/menu/widgets/account_property_tile_builder.dart
index 4174576b2..400ed74d1 100644
--- a/lib/features/manage_account/presentation/menu/widgets/account_property_tile_builder.dart
+++ b/lib/features/manage_account/presentation/menu/widgets/account_property_tile_builder.dart
@@ -1,54 +1,59 @@
import 'package:core/core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
-import 'package:tmail_ui_user/features/manage_account/presentation/model/account_property.dart';
+import 'package:tmail_ui_user/features/manage_account/presentation/model/account_menu_item.dart';
-class AccountPropertyTileBuilder extends StatelessWidget {
+typedef OnSelectAccountMenuItemAction = void Function(AccountMenuItem);
+
+class AccountMenuItemTileBuilder extends StatelessWidget {
final BuildContext _context;
final ImagePaths _imagePaths;
final ResponsiveUtils _responsiveUtils;
- final AccountProperty _accountProperty;
- final AccountProperty _accountPropertySelected;
+ final AccountMenuItem _menuItem;
+ final AccountMenuItem _menuItemSelected;
+ final OnSelectAccountMenuItemAction? onSelectAccountMenuItemAction;
- const AccountPropertyTileBuilder(
+ const AccountMenuItemTileBuilder(
this._context,
this._imagePaths,
this._responsiveUtils,
- this._accountProperty,
- this._accountPropertySelected, {Key? key}
+ this._menuItem,
+ this._menuItemSelected,
+ {Key? key, this.onSelectAccountMenuItemAction}
) : super(key: key);
@override
Widget build(BuildContext context) {
- return Theme(
+ return InkWell(
+ onTap: () => onSelectAccountMenuItemAction?.call(_menuItem),
+ child: Theme(
data: ThemeData(
splashColor: Colors.transparent,
highlightColor: Colors.transparent),
child: Container(
- key: const Key('account_property_tile'),
+ key: const Key('account_menu_item_tile'),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
- color: backgroundColorItem
- ),
+ color: backgroundColorItem),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
child: MediaQuery(
data: const MediaQueryData(padding: EdgeInsets.zero),
child: Column(children: [
Row(children: [
- SvgPicture.asset(_accountProperty.getIcon(_imagePaths), width: 28, height: 28, fit: BoxFit.fill),
+ SvgPicture.asset(_menuItem.getIcon(_imagePaths), width: 28, height: 28, fit: BoxFit.fill),
const SizedBox(width: 12),
- Expanded(child: Text(_accountProperty.getName(context),
- style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: Colors.black)))
+ Expanded(child: Text(_menuItem.getName(context),
+ style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: Colors.black)))
]),
])
)
)
- );
+ ));
}
Color get backgroundColorItem {
- if (_accountPropertySelected == _accountProperty) {
+ if (_menuItemSelected == _menuItem) {
return AppColor.colorBgMailboxSelected;
}
return _responsiveUtils.isDesktop(_context) ? AppColor.colorBgDesktop : Colors.white;
diff --git a/lib/features/manage_account/presentation/model/account_property.dart b/lib/features/manage_account/presentation/model/account_menu_item.dart
similarity index 72%
rename from lib/features/manage_account/presentation/model/account_property.dart
rename to lib/features/manage_account/presentation/model/account_menu_item.dart
index c4dc3f893..1c384bbbc 100644
--- a/lib/features/manage_account/presentation/model/account_property.dart
+++ b/lib/features/manage_account/presentation/model/account_menu_item.dart
@@ -3,22 +3,22 @@ import 'package:core/core.dart';
import 'package:flutter/cupertino.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
-enum AccountProperty {
+enum AccountMenuItem {
profiles
}
-extension AccountPropertyExtension on AccountProperty {
+extension AccountMenuItemExtension on AccountMenuItem {
String getIcon(ImagePaths imagePaths) {
switch(this) {
- case AccountProperty.profiles:
+ case AccountMenuItem.profiles:
return imagePaths.icProfiles;
}
}
String getName(BuildContext context) {
switch(this) {
- case AccountProperty.profiles:
+ case AccountMenuItem.profiles:
return AppLocalizations.of(context).profiles;
}
}
diff --git a/lib/features/manage_account/presentation/model/manage_account_arguments.dart b/lib/features/manage_account/presentation/model/manage_account_arguments.dart
new file mode 100644
index 000000000..9c71cbd74
--- /dev/null
+++ b/lib/features/manage_account/presentation/model/manage_account_arguments.dart
@@ -0,0 +1,15 @@
+
+import 'package:equatable/equatable.dart';
+import 'package:jmap_dart_client/jmap/account_id.dart';
+import 'package:model/model.dart';
+
+class ManageAccountArguments with EquatableMixin {
+
+ final AccountId? accountId;
+ final UserProfile? userProfile;
+
+ ManageAccountArguments(this.accountId, this.userProfile);
+
+ @override
+ List