TF-460 Add presentation layer for implement get all identities
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 3.5C12.5523 3.5 13 3.94772 13 4.5L13 11H19.5C20.0523 11 20.5 11.4477 20.5 12C20.5 12.5523 20.0523 13 19.5 13H13L13 19.5001C13 20.0524 12.5523 20.5001 12 20.5001C11.4477 20.5001 11 20.0524 11 19.5001L10.999 13H4.5C3.94772 13 3.5 12.5523 3.5 12C3.5 11.4477 3.94772 11 4.5 11H10.999L11 4.5C11 3.94772 11.4477 3.5 12 3.5Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 450 B |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 14.1983L6.64021 9.7318C6.21593 9.37824 5.58537 9.43556 5.2318 9.85984C4.87824 10.2841 4.93556 10.9147 5.35984 11.2682L11.3598 16.2682C11.7307 16.5773 12.2694 16.5773 12.6402 16.2682L18.6402 11.2682C19.0645 10.9147 19.1218 10.2841 18.7682 9.85984C18.4147 9.43556 17.7841 9.37824 17.3598 9.7318L12 14.1983Z" fill="#B8C1CC"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 439 B |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M2.98535 11.895H13.2051C13.7764 11.895 14.2186 11.73 14.5317 11.3999C14.8491 11.0741 15.0078 10.5832 15.0078 9.92725V2.91943C15.0078 2.26774 14.8407 1.77897 14.5063 1.45312C14.1763 1.12305 13.679 0.958008 13.0146 0.958008H2.79492C2.22363 0.958008 1.7793 1.12305 1.46191 1.45312C1.14876 1.77897 0.992188 2.26774 0.992188 2.91943V9.92725C0.992188 10.5832 1.15723 11.0741 1.4873 11.3999C1.82161 11.73 2.32096 11.895 2.98535 11.895ZM2.94727 10.9238C2.62988 10.9238 2.38656 10.8413 2.21729 10.6763C2.04801 10.507 1.96338 10.2573 1.96338 9.92725V2.91943C1.96338 2.59359 2.04801 2.34814 2.21729 2.18311C2.38656 2.01383 2.62988 1.9292 2.94727 1.9292H13.0527C13.3659 1.9292 13.6071 2.01383 13.7764 2.18311C13.9499 2.34814 14.0366 2.5957 14.0366 2.92578V9.93359C14.0366 10.2594 13.9499 10.507 13.7764 10.6763C13.6071 10.8413 13.3659 10.9238 13.0527 10.9238H2.94727ZM8.0127 8.11816C8.23698 8.11816 8.45703 8.0695 8.67285 7.97217C8.88867 7.87484 9.10872 7.71615 9.33301 7.49609L14.4873 2.43066L13.8271 1.76416L8.78076 6.74707C8.64111 6.88249 8.50781 6.98193 8.38086 7.04541C8.25814 7.10889 8.13542 7.14062 8.0127 7.14062C7.88574 7.14062 7.75879 7.10889 7.63184 7.04541C7.50911 6.9777 7.38005 6.87826 7.24463 6.74707L2.17285 1.73877L1.50635 2.40527L6.69238 7.49609C6.91243 7.71615 7.13037 7.87484 7.34619 7.97217C7.56624 8.0695 7.78841 8.11816 8.0127 8.11816ZM13.7637 11.0635L14.4238 10.397L10.3169 6.34082L9.65674 7.00098L13.7637 11.0635ZM1.59521 10.4033L2.25537 11.0698L6.36865 7.00098L5.70215 6.34082L1.59521 10.4033Z" fill="#007AFF"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M16.25 7C16.25 8.24264 15.2426 9.25 14 9.25C12.7574 9.25 11.75 8.24264 11.75 7C11.75 5.75736 12.7574 4.75 14 4.75C15.2426 4.75 16.25 5.75736 16.25 7ZM16.25 14C16.25 15.2426 15.2426 16.25 14 16.25C12.7574 16.25 11.75 15.2426 11.75 14C11.75 12.7574 12.7574 11.75 14 11.75C15.2426 11.75 16.25 12.7574 16.25 14ZM16.25 21C16.25 22.2426 15.2426 23.25 14 23.25C12.7574 23.25 11.75 22.2426 11.75 21C11.75 19.7574 12.7574 18.75 14 18.75C15.2426 18.75 16.25 19.7574 16.25 21Z" fill="#99A2AD"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 596 B |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="15" height="13" viewBox="0 0 15 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M7.06689 12.2378C7.28271 12.2378 7.46045 12.168 7.6001 12.0283C7.73975 11.8887 7.80957 11.7109 7.80957 11.4951V9.07031H7.99365C8.81462 9.07031 9.54036 9.15072 10.1709 9.31152C10.8014 9.47233 11.3579 9.74951 11.8403 10.1431C12.3228 10.5324 12.748 11.0741 13.1162 11.7681C13.2262 11.9712 13.349 12.1003 13.4844 12.1553C13.624 12.2103 13.7616 12.2378 13.897 12.2378C14.0662 12.2378 14.2165 12.1637 14.3477 12.0156C14.4831 11.8717 14.5508 11.6623 14.5508 11.3872C14.5508 10.215 14.4217 9.1613 14.1636 8.22607C13.9097 7.28662 13.5161 6.4847 12.9829 5.82031C12.4539 5.15592 11.7747 4.64811 10.9453 4.29688C10.1201 3.94564 9.13623 3.77002 7.99365 3.77002H7.80957V1.37061C7.80957 1.15902 7.73975 0.977051 7.6001 0.824707C7.46045 0.672363 7.27848 0.596191 7.0542 0.596191C6.89762 0.596191 6.75798 0.632161 6.63525 0.704102C6.51253 0.77181 6.36654 0.886068 6.19727 1.04688L1.18896 5.73145C1.06624 5.8457 0.981608 5.96208 0.935059 6.08057C0.888509 6.19906 0.865234 6.3112 0.865234 6.41699C0.865234 6.51855 0.888509 6.62858 0.935059 6.74707C0.981608 6.86556 1.06624 6.98193 1.18896 7.09619L6.19727 11.8252C6.34961 11.9691 6.49349 12.0728 6.62891 12.1362C6.76432 12.2039 6.91032 12.2378 7.06689 12.2378ZM6.70508 10.873C6.66699 10.873 6.63102 10.854 6.59717 10.8159L2.07129 6.5376C2.0459 6.51221 2.02686 6.49105 2.01416 6.47412C2.0057 6.45296 2.00146 6.43392 2.00146 6.41699C2.00146 6.37891 2.02474 6.3387 2.07129 6.29639L6.59082 1.96094C6.60775 1.94824 6.62467 1.93766 6.6416 1.9292C6.65853 1.9165 6.67757 1.91016 6.69873 1.91016C6.75798 1.91016 6.7876 1.93978 6.7876 1.99902V4.51904C6.7876 4.65869 6.85954 4.72852 7.00342 4.72852H7.854C8.72575 4.72852 9.48112 4.84066 10.1201 5.06494C10.7591 5.28499 11.2987 5.5918 11.7388 5.98535C12.1789 6.37467 12.5343 6.82536 12.8052 7.3374C13.076 7.84945 13.277 8.39746 13.4082 8.98145C13.5436 9.5612 13.624 10.1494 13.6494 10.7461C13.6494 10.7926 13.6325 10.8159 13.5986 10.8159C13.5859 10.8159 13.5754 10.8117 13.5669 10.8032C13.5584 10.7905 13.55 10.7736 13.5415 10.7524C13.2918 10.2235 12.9131 9.76009 12.4053 9.3623C11.8975 8.96452 11.2627 8.65771 10.501 8.44189C9.74349 8.22184 8.86117 8.11182 7.854 8.11182H7.00342C6.85954 8.11182 6.7876 8.18164 6.7876 8.32129V10.7778C6.7876 10.8413 6.76009 10.873 6.70508 10.873Z" fill="#007AFF"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -107,6 +107,7 @@ extension AppColor on Color {
|
|||||||
static const colorAvatar = Color(0xFFDE5E5E);
|
static const colorAvatar = Color(0xFFDE5E5E);
|
||||||
static const colorFocusButton = Color(0x14818C99);
|
static const colorFocusButton = Color(0x14818C99);
|
||||||
static const colorBorderEmailAddressInvalid = Color(0xFFFF3347);
|
static const colorBorderEmailAddressInvalid = Color(0xFFFF3347);
|
||||||
|
static const colorBorderIdentityInfo = Color(0xFFE7E8EC);
|
||||||
static const colorBgMailboxSelected = Color(0xFF99E4E8EC);
|
static const colorBgMailboxSelected = Color(0xFF99E4E8EC);
|
||||||
static const colorLoading = Color(0x2999A2AD);
|
static const colorLoading = Color(0x2999A2AD);
|
||||||
static const colorActionButtonHover = Color(0xFFA2AAB3);
|
static const colorActionButtonHover = Color(0xFFA2AAB3);
|
||||||
|
|||||||
@@ -95,6 +95,11 @@ class ImagePaths {
|
|||||||
String get icLogout => _getImagePath('ic_logout.svg');
|
String get icLogout => _getImagePath('ic_logout.svg');
|
||||||
String get icSetting => _getImagePath('ic_setting.svg');
|
String get icSetting => _getImagePath('ic_setting.svg');
|
||||||
String get icProfiles => _getImagePath('ic_profiles.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) {
|
String _getImagePath(String imageName) {
|
||||||
return AssetsPaths.images + imageName;
|
return AssetsPaths.images + imageName;
|
||||||
|
|||||||
@@ -102,8 +102,4 @@ abstract class ReloadableController extends BaseController {
|
|||||||
_clearAllCacheAction();
|
_clearAllCacheAction();
|
||||||
goToLogin();
|
goToLogin();
|
||||||
}
|
}
|
||||||
|
|
||||||
void goToSettings() {
|
|
||||||
push(AppRoutes.MANAGE_ACCOUNT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -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/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/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/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/model/search_query.dart';
|
||||||
import 'package:tmail_ui_user/features/thread/domain/state/search_email_state.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';
|
import 'package:tmail_ui_user/features/thread/presentation/model/search_state.dart';
|
||||||
@@ -422,6 +423,11 @@ class MailboxDashBoardController extends ReloadableController {
|
|||||||
dashBoardAction.value = DashBoardAction.idle;
|
dashBoardAction.value = DashBoardAction.idle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void goToSettings() {
|
||||||
|
push(AppRoutes.MANAGE_ACCOUNT,
|
||||||
|
arguments: ManageAccountArguments(accountId.value, userProfile.value));
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
_emailReceiveManager.closeEmailReceiveManagerStream();
|
_emailReceiveManager.closeEmailReceiveManagerStream();
|
||||||
|
|||||||
+5
-5
@@ -15,11 +15,11 @@ mixin UserSettingPopupMenuMixin {
|
|||||||
enabled: false,
|
enabled: false,
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
child: _userInformation(context, userProfile)),
|
child: _userInformation(context, userProfile)),
|
||||||
PopupMenuDivider(height: 0.5),
|
const PopupMenuDivider(height: 0.5),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
child: _settingAction(context, onSettingAction)),
|
child: _settingAction(context, onSettingAction)),
|
||||||
PopupMenuDivider(height: 0.5),
|
const PopupMenuDivider(height: 0.5),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
child: _logoutAction(context, onLogoutAction)),
|
child: _logoutAction(context, onLogoutAction)),
|
||||||
@@ -31,14 +31,14 @@ mixin UserSettingPopupMenuMixin {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 300,
|
width: 300,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
contentPadding: EdgeInsets.symmetric(horizontal: 20),
|
contentPadding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
title: Text(userProfile.email, maxLines: 1, style: TextStyle(
|
title: Text(userProfile.email, maxLines: 1, style: const TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
color: AppColor.colorHintSearchBar,
|
color: AppColor.colorHintSearchBar,
|
||||||
fontWeight: FontWeight.normal))),
|
fontWeight: FontWeight.normal))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _settingAction(BuildContext context, Function? onCallBack) {
|
Widget _settingAction(BuildContext context, Function? onCallBack) {
|
||||||
|
|||||||
-31
@@ -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() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-17
@@ -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<IdentitiesController> {
|
|
||||||
|
|
||||||
final _responsiveUtils = Get.find<ResponsiveUtils>();
|
|
||||||
|
|
||||||
IdentitiesView({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(color: Colors.green);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-17
@@ -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) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-60
@@ -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<ScaffoldState>();
|
|
||||||
|
|
||||||
final appInformation = Rxn<PackageInfo>();
|
|
||||||
final userProfile = Rxn<UserProfile>();
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
+2
-2
@@ -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/base/base_bindings.dart';
|
||||||
import 'package:tmail_ui_user/features/login/domain/repository/credential_repository.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/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/manage_account_dashboard_controller.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/menu/manage_account_menu_bindings.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 {
|
class ManageAccountDashBoardBindings extends BaseBindings {
|
||||||
|
|
||||||
@@ -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<ResponsiveUtils>();
|
||||||
|
|
||||||
|
final GetUserProfileInteractor _getUserProfileInteractor;
|
||||||
|
|
||||||
|
final menuDrawerKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
|
final appInformation = Rxn<PackageInfo>();
|
||||||
|
final userProfile = Rxn<UserProfile>();
|
||||||
|
final accountId = Rxn<AccountId>();
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-10
@@ -4,10 +4,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:get/get.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/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/manage_account_dashboard_controller.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/menu/manage_account_menu_view.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/localizations/app_localizations.dart';
|
||||||
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
|
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(child: ManageAccountMenuView(), width: _responsiveUtils.defaultSizeMenuWidthWeb),
|
SizedBox(child: ManageAccountMenuView(), width: _responsiveUtils.defaultSizeMenuWidthWeb),
|
||||||
Expanded(child: _manageAccountContentView())
|
Expanded(child: _viewDisplayedOfAccountMenuItem())
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
]),
|
]),
|
||||||
@@ -88,7 +88,7 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
|
|||||||
.build(),
|
.build(),
|
||||||
Expanded(child: Padding(
|
Expanded(child: Padding(
|
||||||
padding: const EdgeInsets.only(left: 24, right: 24, bottom: 16),
|
padding: const EdgeInsets.only(left: 24, right: 24, bottom: 16),
|
||||||
child: _manageAccountContentView()))
|
child: _viewDisplayedOfAccountMenuItem()))
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
@@ -104,7 +104,7 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
|
|||||||
..addOnOpenSearchViewAction(() => {}))
|
..addOnOpenSearchViewAction(() => {}))
|
||||||
.build(),
|
.build(),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
(AvatarBuilder()
|
Obx(() => (AvatarBuilder()
|
||||||
..text(controller.userProfile.value?.getAvatarText() ?? '')
|
..text(controller.userProfile.value?.getAvatarText() ?? '')
|
||||||
..backgroundColor(Colors.white)
|
..backgroundColor(Colors.white)
|
||||||
..textColor(Colors.black)
|
..textColor(Colors.black)
|
||||||
@@ -121,7 +121,7 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
|
|||||||
color: AppColor.colorShadowBgContentEmail,
|
color: AppColor.colorShadowBgContentEmail,
|
||||||
spreadRadius: 1, blurRadius: 1, offset: Offset(0, 0.5))])
|
spreadRadius: 1, blurRadius: 1, offset: Offset(0, 0.5))])
|
||||||
..size(48))
|
..size(48))
|
||||||
.build(),
|
.build()),
|
||||||
const SizedBox(width: 16)
|
const SizedBox(width: 16)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -140,9 +140,9 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _manageAccountContentView() {
|
Widget _viewDisplayedOfAccountMenuItem() {
|
||||||
switch(controller.accountPropertySelected.value) {
|
switch(controller.accountMenuItemSelected.value) {
|
||||||
case AccountProperty.profiles:
|
case AccountMenuItem.profiles:
|
||||||
return ProfilesView();
|
return ProfilesView();
|
||||||
default:
|
default:
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:tmail_ui_user/features/base/base_controller.dart';
|
import 'package:tmail_ui_user/features/base/base_controller.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/model/account_property.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/model/account_menu_item.dart';
|
||||||
|
|
||||||
class ManageAccountMenuController extends BaseController {
|
class ManageAccountMenuController extends BaseController {
|
||||||
|
|
||||||
final dashBoardController = Get.find<ManageAccountDashBoardController>();
|
final dashBoardController = Get.find<ManageAccountDashBoardController>();
|
||||||
|
|
||||||
final listAccountProperties = <AccountProperty>[
|
final listAccountMenuItem = <AccountMenuItem>[
|
||||||
AccountProperty.profiles
|
AccountMenuItem.profiles
|
||||||
];
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -19,4 +19,8 @@ class ManageAccountMenuController extends BaseController {
|
|||||||
@override
|
@override
|
||||||
void onError(error) {
|
void onError(error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void selectAccountMenuItem(AccountMenuItem newAccountMenuItem) {
|
||||||
|
dashBoardController.selectAccountMenuItem(newAccountMenuItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -65,23 +65,29 @@ class ManageAccountMenuView extends GetWidget<ManageAccountMenuController> {
|
|||||||
padding: const EdgeInsets.only(left: 16, right: 8),
|
padding: const EdgeInsets.only(left: 16, right: 8),
|
||||||
key: const Key('list_manage_account_property'),
|
key: const Key('list_manage_account_property'),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemCount: controller.listAccountProperties.length,
|
itemCount: controller.listAccountMenuItem.length,
|
||||||
itemBuilder: (context, index) => Obx(() => AccountPropertyTileBuilder(
|
itemBuilder: (context, index) => Obx(() => AccountMenuItemTileBuilder(
|
||||||
context,
|
context,
|
||||||
_imagePaths,
|
_imagePaths,
|
||||||
_responsiveUtils,
|
_responsiveUtils,
|
||||||
controller.listAccountProperties[index],
|
controller.listAccountMenuItem[index],
|
||||||
controller.dashBoardController.accountPropertySelected.value))),
|
controller.dashBoardController.accountMenuItemSelected.value,
|
||||||
|
onSelectAccountMenuItemAction: (newAccountMenuItem) =>
|
||||||
|
controller.selectAccountMenuItem(newAccountMenuItem)))),
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 16),
|
padding: EdgeInsets.symmetric(vertical: 16),
|
||||||
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
|
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
|
||||||
Padding(padding: const EdgeInsets.only(left: 32),
|
Padding(padding: const EdgeInsets.only(left: 32),
|
||||||
child: InkWell(child: Row(children: [
|
child: InkWell(
|
||||||
SvgPicture.asset(_imagePaths.icLogout, fit: BoxFit.fill),
|
onTap: () => controller.dashBoardController.logoutAction(),
|
||||||
const SizedBox(width: 12),
|
child: Row(children: [
|
||||||
Expanded(child: Text(AppLocalizations.of(context).sign_out,
|
SvgPicture.asset(_imagePaths.icLogout, fit: BoxFit.fill),
|
||||||
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: Colors.black)))
|
const SizedBox(width: 12),
|
||||||
]))),
|
Expanded(child: Text(AppLocalizations.of(context).sign_out,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: Colors.black)))
|
||||||
|
])
|
||||||
|
)
|
||||||
|
),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
]
|
]
|
||||||
|
|||||||
+21
-16
@@ -1,54 +1,59 @@
|
|||||||
import 'package:core/core.dart';
|
import 'package:core/core.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.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 BuildContext _context;
|
||||||
final ImagePaths _imagePaths;
|
final ImagePaths _imagePaths;
|
||||||
final ResponsiveUtils _responsiveUtils;
|
final ResponsiveUtils _responsiveUtils;
|
||||||
final AccountProperty _accountProperty;
|
final AccountMenuItem _menuItem;
|
||||||
final AccountProperty _accountPropertySelected;
|
final AccountMenuItem _menuItemSelected;
|
||||||
|
final OnSelectAccountMenuItemAction? onSelectAccountMenuItemAction;
|
||||||
|
|
||||||
const AccountPropertyTileBuilder(
|
const AccountMenuItemTileBuilder(
|
||||||
this._context,
|
this._context,
|
||||||
this._imagePaths,
|
this._imagePaths,
|
||||||
this._responsiveUtils,
|
this._responsiveUtils,
|
||||||
this._accountProperty,
|
this._menuItem,
|
||||||
this._accountPropertySelected, {Key? key}
|
this._menuItemSelected,
|
||||||
|
{Key? key, this.onSelectAccountMenuItemAction}
|
||||||
) : super(key: key);
|
) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Theme(
|
return InkWell(
|
||||||
|
onTap: () => onSelectAccountMenuItemAction?.call(_menuItem),
|
||||||
|
child: Theme(
|
||||||
data: ThemeData(
|
data: ThemeData(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent),
|
highlightColor: Colors.transparent),
|
||||||
child: Container(
|
child: Container(
|
||||||
key: const Key('account_property_tile'),
|
key: const Key('account_menu_item_tile'),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
color: backgroundColorItem
|
color: backgroundColorItem),
|
||||||
),
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||||
child: MediaQuery(
|
child: MediaQuery(
|
||||||
data: const MediaQueryData(padding: EdgeInsets.zero),
|
data: const MediaQueryData(padding: EdgeInsets.zero),
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Row(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),
|
const SizedBox(width: 12),
|
||||||
Expanded(child: Text(_accountProperty.getName(context),
|
Expanded(child: Text(_menuItem.getName(context),
|
||||||
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: Colors.black)))
|
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: Colors.black)))
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
Color get backgroundColorItem {
|
Color get backgroundColorItem {
|
||||||
if (_accountPropertySelected == _accountProperty) {
|
if (_menuItemSelected == _menuItem) {
|
||||||
return AppColor.colorBgMailboxSelected;
|
return AppColor.colorBgMailboxSelected;
|
||||||
}
|
}
|
||||||
return _responsiveUtils.isDesktop(_context) ? AppColor.colorBgDesktop : Colors.white;
|
return _responsiveUtils.isDesktop(_context) ? AppColor.colorBgDesktop : Colors.white;
|
||||||
|
|||||||
+4
-4
@@ -3,22 +3,22 @@ import 'package:core/core.dart';
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
enum AccountProperty {
|
enum AccountMenuItem {
|
||||||
profiles
|
profiles
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AccountPropertyExtension on AccountProperty {
|
extension AccountMenuItemExtension on AccountMenuItem {
|
||||||
|
|
||||||
String getIcon(ImagePaths imagePaths) {
|
String getIcon(ImagePaths imagePaths) {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
case AccountProperty.profiles:
|
case AccountMenuItem.profiles:
|
||||||
return imagePaths.icProfiles;
|
return imagePaths.icProfiles;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getName(BuildContext context) {
|
String getName(BuildContext context) {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
case AccountProperty.profiles:
|
case AccountMenuItem.profiles:
|
||||||
return AppLocalizations.of(context).profiles;
|
return AppLocalizations.of(context).profiles;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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<Object?> get props => [accountId, userProfile];
|
||||||
|
}
|
||||||
@@ -4,21 +4,15 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
enum ProfilesTabType {
|
enum ProfilesTabType {
|
||||||
personalInfo,
|
|
||||||
identities,
|
identities,
|
||||||
follower,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ProfilesTabTypeExtension on ProfilesTabType {
|
extension ProfilesTabTypeExtension on ProfilesTabType {
|
||||||
|
|
||||||
String getName(BuildContext context) {
|
String getName(BuildContext context) {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
case ProfilesTabType.personalInfo:
|
|
||||||
return AppLocalizations.of(context).identities;
|
|
||||||
case ProfilesTabType.identities:
|
case ProfilesTabType.identities:
|
||||||
return AppLocalizations.of(context).identities;
|
return AppLocalizations.of(context).identities;
|
||||||
case ProfilesTabType.follower:
|
|
||||||
return AppLocalizations.of(context).identities;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:jmap_dart_client/http/http_client.dart' as jmap_http_client;
|
||||||
|
import 'package:tmail_ui_user/features/base/base_bindings.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/data/datasource/manage_account_datasource.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/data/datasource_impl/manage_account_datasource_impl.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/data/network/manage_account_api.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/data/repository/manage_account_repository_impl.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/domain/repository/manage_account_repository.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/get_all_identities_interactor.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/presentation/profiles/identities/identities_controller.dart';
|
||||||
|
|
||||||
|
class IdentitiesBindings extends BaseBindings {
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => ManageAccountAPI(Get.find<jmap_http_client.HttpClient>()));
|
||||||
|
super.dependencies();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void bindingsController() {
|
||||||
|
Get.lazyPut(() => IdentitiesController(Get.find<GetAllIdentitiesInteractor>()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void bindingsDataSource() {
|
||||||
|
Get.lazyPut<ManageAccountDataSource>(() => Get.find<ManageAccountDataSourceImpl>());
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void bindingsDataSourceImpl() {
|
||||||
|
Get.lazyPut(() => ManageAccountDataSourceImpl(Get.find<ManageAccountAPI>()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void bindingsInteractor() {
|
||||||
|
Get.lazyPut(() => GetAllIdentitiesInteractor(Get.find<ManageAccountRepository>()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void bindingsRepository() {
|
||||||
|
Get.lazyPut<ManageAccountRepository>(() => Get.find<ManageAccountRepositoryImpl>());
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void bindingsRepositoryImpl() {
|
||||||
|
Get.lazyPut(() => ManageAccountRepositoryImpl(Get.find<ManageAccountDataSource>()));
|
||||||
|
}
|
||||||
|
}
|
||||||
+63
@@ -0,0 +1,63 @@
|
|||||||
|
|
||||||
|
import 'package:core/core.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||||
|
import 'package:jmap_dart_client/jmap/identities/identity.dart';
|
||||||
|
import 'package:tmail_ui_user/features/base/base_controller.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/domain/state/get_all_identities_state.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/get_all_identities_interactor.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/presentation/manage_account_dashboard_controller.dart';
|
||||||
|
|
||||||
|
class IdentitiesController extends BaseController {
|
||||||
|
|
||||||
|
final _accountDashBoardController = Get.find<ManageAccountDashBoardController>();
|
||||||
|
|
||||||
|
final GetAllIdentitiesInteractor _getAllIdentitiesInteractor;
|
||||||
|
|
||||||
|
final identitySelected = Rxn<Identity>();
|
||||||
|
final listIdentities = <Identity>[].obs;
|
||||||
|
|
||||||
|
IdentitiesController(this._getAllIdentitiesInteractor);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
_onAccountDashBoardListener();
|
||||||
|
super.onInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onDone() {
|
||||||
|
viewState.value.fold(
|
||||||
|
(failure) {},
|
||||||
|
(success) {
|
||||||
|
if (success is GetAllIdentitiesSuccess) {
|
||||||
|
if (success.identities?.isNotEmpty == true) {
|
||||||
|
listIdentities.value = success.identities ?? [];
|
||||||
|
selectIdentity(listIdentities.first);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onError(error) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onAccountDashBoardListener() {
|
||||||
|
_accountDashBoardController.accountId.listen((accountId) {
|
||||||
|
log('IdentitiesController::_onAccountDashBoardListener(): accountId: $accountId');
|
||||||
|
if (accountId != null) {
|
||||||
|
_getAllIdentities(accountId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _getAllIdentities(AccountId accountId) {
|
||||||
|
consumeState(_getAllIdentitiesInteractor.execute(accountId));
|
||||||
|
}
|
||||||
|
|
||||||
|
void selectIdentity(Identity? newIdentity) {
|
||||||
|
identitySelected.value = newIdentity;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
|
||||||
|
import 'package:core/core.dart';
|
||||||
|
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:jmap_dart_client/jmap/identities/identity.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/presentation/profiles/identities/identities_controller.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/presentation/profiles/identities/widgets/identity_info_tile_builder.dart';
|
||||||
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
|
class IdentitiesView extends GetWidget<IdentitiesController> {
|
||||||
|
|
||||||
|
final _responsiveUtils = Get.find<ResponsiveUtils>();
|
||||||
|
final _imagePaths = Get.find<ImagePaths>();
|
||||||
|
|
||||||
|
IdentitiesView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final buttonSelectIdentity = Row(children: [
|
||||||
|
Expanded(child: Obx(() => DropdownButtonHideUnderline(
|
||||||
|
child: DropdownButton2<Identity>(
|
||||||
|
isExpanded: true,
|
||||||
|
hint: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(child: Text(
|
||||||
|
controller.identitySelected.value?.name ?? '',
|
||||||
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.normal, color: Colors.black),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
items: controller.listIdentities.map((item) => DropdownMenuItem<Identity>(
|
||||||
|
value: item,
|
||||||
|
child: Text(
|
||||||
|
item.name ?? '',
|
||||||
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.normal, color: Colors.black),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
)).toList(),
|
||||||
|
value: controller.identitySelected.value,
|
||||||
|
onChanged: (newIdentity) => controller.selectIdentity(newIdentity),
|
||||||
|
icon: SvgPicture.asset(_imagePaths.icDropDown),
|
||||||
|
buttonPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
buttonDecoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
border: Border.all(color: AppColor.colorInputBorderCreateMailbox, width: 0.5),
|
||||||
|
color: AppColor.colorInputBackgroundCreateMailbox),
|
||||||
|
itemHeight: 44,
|
||||||
|
buttonHeight: 44,
|
||||||
|
itemPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
dropdownMaxHeight: 200,
|
||||||
|
dropdownDecoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
color: Colors.white),
|
||||||
|
dropdownElevation: 4,
|
||||||
|
scrollbarRadius: const Radius.circular(40),
|
||||||
|
scrollbarThickness: 6,
|
||||||
|
),
|
||||||
|
))),
|
||||||
|
if (!_responsiveUtils.isMobile(context)) const SizedBox(width: 12),
|
||||||
|
if (!_responsiveUtils.isMobile(context))
|
||||||
|
(ButtonBuilder(_imagePaths.icAddIdentity)
|
||||||
|
..key(const Key('button_new_identity'))
|
||||||
|
..decoration(BoxDecoration(borderRadius: BorderRadius.circular(10), color: AppColor.colorTextButton))
|
||||||
|
..paddingIcon(const EdgeInsets.only(right: 8))
|
||||||
|
..iconColor(Colors.white)
|
||||||
|
..maxWidth(170)
|
||||||
|
..size(20)
|
||||||
|
..radiusSplash(10)
|
||||||
|
..padding(const EdgeInsets.symmetric(vertical: 12))
|
||||||
|
..textStyle(const TextStyle(fontSize: 17, color: Colors.white, fontWeight: FontWeight.w500))
|
||||||
|
..onPressActionClick(() => {})
|
||||||
|
..text(AppLocalizations.of(context).new_identity, isVertical: false))
|
||||||
|
.build()
|
||||||
|
]);
|
||||||
|
|
||||||
|
return LayoutBuilder(builder: (context, constraints) => ResponsiveWidget(
|
||||||
|
responsiveUtils: _responsiveUtils,
|
||||||
|
mobile: Scaffold(
|
||||||
|
body: Container(
|
||||||
|
margin: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
buttonSelectIdentity,
|
||||||
|
Obx(() => IdentityInfoTileBuilder(context,
|
||||||
|
_imagePaths,
|
||||||
|
controller.identitySelected.value)),
|
||||||
|
]
|
||||||
|
)),
|
||||||
|
floatingActionButton: _responsiveUtils.isMobile(context)
|
||||||
|
? FloatingActionButton(
|
||||||
|
key: const Key('add_new_identity'),
|
||||||
|
onPressed: () => {},
|
||||||
|
backgroundColor: AppColor.primaryColor,
|
||||||
|
child: SvgPicture.asset(_imagePaths.icAddIdentity, width: 24, height: 24))
|
||||||
|
: null),
|
||||||
|
desktop: Container(
|
||||||
|
margin: const EdgeInsets.symmetric(vertical: 24, horizontal: 16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: constraints.maxWidth / 2,
|
||||||
|
child: buttonSelectIdentity),
|
||||||
|
Obx(() => IdentityInfoTileBuilder(context,
|
||||||
|
_imagePaths,
|
||||||
|
controller.identitySelected.value,
|
||||||
|
maxWidth: constraints.maxWidth / 2)),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
+117
@@ -0,0 +1,117 @@
|
|||||||
|
import 'package:core/core.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:jmap_dart_client/jmap/identities/identity.dart';
|
||||||
|
import 'package:model/model.dart';
|
||||||
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
|
class IdentityInfoTileBuilder extends StatelessWidget {
|
||||||
|
|
||||||
|
final BuildContext _context;
|
||||||
|
final ImagePaths _imagePaths;
|
||||||
|
final Identity? _identity;
|
||||||
|
final double? maxWidth;
|
||||||
|
|
||||||
|
const IdentityInfoTileBuilder(
|
||||||
|
this._context,
|
||||||
|
this._imagePaths,
|
||||||
|
this._identity,
|
||||||
|
{Key? key, this.maxWidth}
|
||||||
|
) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (_identity == null) {
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
key: const Key('identity_info_tile'),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
border: Border.all(color: AppColor.colorBorderIdentityInfo, width: 1),
|
||||||
|
color: Colors.white),
|
||||||
|
padding: const EdgeInsets.only(top: 12, bottom: 12),
|
||||||
|
margin: const EdgeInsets.only(top: 12),
|
||||||
|
width: maxWidth,
|
||||||
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
child: Row(children: [
|
||||||
|
Expanded(child: Text(_identity?.name ?? '',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w500, fontSize: 17, color: Colors.black))),
|
||||||
|
buildIconWeb(
|
||||||
|
icon: SvgPicture.asset(_imagePaths.icMoreVertical, fit: BoxFit.fill),
|
||||||
|
onTap: () => {})
|
||||||
|
])),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
const Divider(color: AppColor.colorDividerMailbox, height: 0.5, thickness: 0.2),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
child: Text(_identity?.name ?? '',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 17, color: Colors.black))),
|
||||||
|
if (_identity?.email != null) const SizedBox(height: 10),
|
||||||
|
if (_identity?.email != null)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
child: Row(children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 40,
|
||||||
|
child: SvgPicture.asset(_imagePaths.icEmail, width: 15, height: 15)),
|
||||||
|
const SizedBox(width: 4),
|
||||||
|
Expanded(child: Text(_identity?.email ?? '',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: AppColor.colorHintSearchBar)))
|
||||||
|
])),
|
||||||
|
if (_identity?.replyTo != null) const SizedBox(height: 10),
|
||||||
|
if (_identity?.replyTo != null)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
child: Row(children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 40,
|
||||||
|
child: SvgPicture.asset(_imagePaths.icReplyTo, width: 15, height: 15)),
|
||||||
|
const SizedBox(width: 4),
|
||||||
|
Expanded(child: Text(_identity?.replyTo?.listEmailAddressToString(isFullEmailAddress: true) ?? '',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: AppColor.colorHintSearchBar)))
|
||||||
|
])),
|
||||||
|
if (_identity?.cc != null) const SizedBox(height: 6),
|
||||||
|
if (_identity?.cc != null)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
child: Row(children: [
|
||||||
|
Container(
|
||||||
|
width: 40,
|
||||||
|
padding: const EdgeInsets.only(left: 10),
|
||||||
|
child: Text(AppLocalizations.of(_context).cc_email_address_prefix,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
color: AppColor.colorTextButton))),
|
||||||
|
const SizedBox(width: 4),
|
||||||
|
Expanded(child: Text(_identity?.cc?.listEmailAddressToString(isFullEmailAddress: true) ?? '',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: AppColor.colorHintSearchBar)))
|
||||||
|
])),
|
||||||
|
if (_identity?.bcc != null) const SizedBox(height: 6),
|
||||||
|
if (_identity?.bcc != null)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
child: Row(children: [
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.only(left: 6),
|
||||||
|
width: 40,
|
||||||
|
child: Text(AppLocalizations.of(_context).bcc_email_address_prefix,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
color: AppColor.colorTextButton))),
|
||||||
|
const SizedBox(width: 4),
|
||||||
|
Expanded(child: Text(_identity?.bcc?.listEmailAddressToString(isFullEmailAddress: true) ?? '',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.normal, fontSize: 15, color: AppColor.colorHintSearchBar)))
|
||||||
|
])),
|
||||||
|
])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-3
@@ -1,14 +1,14 @@
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:tmail_ui_user/features/base/base_bindings.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_bindings.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/profiles/identities/identities_bindings.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/account_properties/profiles/profiles_controller.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/profiles/profiles_controller.dart';
|
||||||
|
|
||||||
class ProfileBindings extends BaseBindings {
|
class ProfileBindings extends BaseBindings {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dependencies() {
|
void dependencies() {
|
||||||
super.dependencies();
|
super.dependencies();
|
||||||
IdentitiesBindings();
|
IdentitiesBindings().dependencies();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import 'package:tmail_ui_user/features/base/base_controller.dart';
|
import 'package:tmail_ui_user/features/base/base_controller.dart';
|
||||||
|
|
||||||
class IdentitiesController extends BaseController {
|
class ProfilesController extends BaseController {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onDone() {
|
void onDone() {
|
||||||
+13
-10
@@ -2,9 +2,9 @@
|
|||||||
import 'package:core/core.dart';
|
import 'package:core/core.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/account_properties/profiles/identities/identities_view.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/model/profiles_tab_type.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/account_properties/profiles/profiles_controller.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/profiles/identities/identities_view.dart';
|
||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/profiles/profiles_controller.dart';
|
||||||
|
|
||||||
class ProfilesView extends GetWidget<ProfilesController> {
|
class ProfilesView extends GetWidget<ProfilesController> {
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ class ProfilesView extends GetWidget<ProfilesController> {
|
|||||||
color: AppColor.colorTextButtonHeaderThread),
|
color: AppColor.colorTextButtonHeaderThread),
|
||||||
labelStyle: const TextStyle(
|
labelStyle: const TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.w500,
|
||||||
color: AppColor.primaryColor),
|
color: AppColor.primaryColor),
|
||||||
labelColor: AppColor.primaryColor,
|
labelColor: AppColor.primaryColor,
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
@@ -48,13 +48,16 @@ class ProfilesView extends GetWidget<ProfilesController> {
|
|||||||
indicatorSize: CustomIndicatorSize.full),
|
indicatorSize: CustomIndicatorSize.full),
|
||||||
onTap: (index) {},
|
onTap: (index) {},
|
||||||
tabs: [
|
tabs: [
|
||||||
Tab(text: AppLocalizations.of(context).identities),
|
Tab(text: ProfilesTabType.identities.getName(context)),
|
||||||
]),
|
]),
|
||||||
body: TabBarView(
|
body: Column(children: [
|
||||||
children: [
|
const Divider(color: AppColor.colorDividerMailbox, height: 0.5, thickness: 0.2),
|
||||||
IdentitiesView(),
|
Expanded(child: TabBarView(
|
||||||
],
|
children: [
|
||||||
),
|
IdentitiesView(),
|
||||||
|
],
|
||||||
|
))
|
||||||
|
]),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"@@last_modified": "2022-04-25T19:06:15.088714",
|
"@@last_modified": "2022-04-26T09:31:06.288489",
|
||||||
"initializing_data": "Initializing data...",
|
"initializing_data": "Initializing data...",
|
||||||
"@initializing_data": {
|
"@initializing_data": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -1119,5 +1119,11 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"new_identity": "New Identity",
|
||||||
|
"@new_identity": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders_order": [],
|
||||||
|
"placeholders": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1173,4 +1173,9 @@ class AppLocalizations {
|
|||||||
return Intl.message('Identities',
|
return Intl.message('Identities',
|
||||||
name: 'identities');
|
name: 'identities');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String get new_identity {
|
||||||
|
return Intl.message('New Identity',
|
||||||
|
name: 'new_identity');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -14,10 +14,10 @@ import 'package:tmail_ui_user/features/mailbox_creator/presentation/mailbox_crea
|
|||||||
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/mailbox_dashboard_bindings.dart';
|
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/mailbox_dashboard_bindings.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/mailbox_dashboard_view.dart'
|
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/mailbox_dashboard_view.dart'
|
||||||
if (dart.library.html) 'package:tmail_ui_user/features/mailbox_dashboard/presentation/mailbox_dashboard_view_web.dart' deferred as mailbox_dashboard;
|
if (dart.library.html) 'package:tmail_ui_user/features/mailbox_dashboard/presentation/mailbox_dashboard_view_web.dart' deferred as mailbox_dashboard;
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/dashboard/manage_account_dashboard_bindings.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/manage_account_dashboard_bindings.dart';
|
||||||
import 'package:tmail_ui_user/features/session/presentation/session_page_bindings.dart';
|
import 'package:tmail_ui_user/features/session/presentation/session_page_bindings.dart';
|
||||||
import 'package:tmail_ui_user/features/session/presentation/session_view.dart' deferred as session;
|
import 'package:tmail_ui_user/features/session/presentation/session_view.dart' deferred as session;
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/dashboard/manage_account_dashboard_view.dart' deferred as manage_account_dashboard;
|
import 'package:tmail_ui_user/features/manage_account/presentation/manage_account_dashboard_view.dart' deferred as manage_account_dashboard;
|
||||||
import 'package:tmail_ui_user/main/pages/deferred_widget.dart';
|
import 'package:tmail_ui_user/main/pages/deferred_widget.dart';
|
||||||
import 'package:tmail_ui_user/main/routes/app_routes.dart';
|
import 'package:tmail_ui_user/main/routes/app_routes.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ abstract class AppRoutes {
|
|||||||
static const COMPOSER = '/composer';
|
static const COMPOSER = '/composer';
|
||||||
static const DESTINATION_PICKER = '/destinationPicker';
|
static const DESTINATION_PICKER = '/destinationPicker';
|
||||||
static const MAILBOX_CREATOR = '/mailboxCreator';
|
static const MAILBOX_CREATOR = '/mailboxCreator';
|
||||||
static const MANAGE_ACCOUNT = '/manage_account';
|
static const MANAGE_ACCOUNT = '$MAILBOX_DASHBOARD/manage_account';
|
||||||
}
|
}
|
||||||
@@ -143,6 +143,8 @@ dependencies:
|
|||||||
|
|
||||||
receive_sharing_intent: 1.4.5
|
receive_sharing_intent: 1.4.5
|
||||||
|
|
||||||
|
dropdown_button2: 1.4.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|||||||
Reference in New Issue
Block a user