TF-1149 remove drawer in emailView and SearchEmailView
This commit is contained in:
@@ -20,31 +20,12 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: ResponsiveUtils.defaultSizeLeftMenuMobile,
|
width: ResponsiveUtils.defaultSizeLeftMenuMobile,
|
||||||
child: ThreadView()),
|
child: _buildScaffoldHaveDrawer(body: ThreadView())),
|
||||||
Expanded(child: EmailView()),
|
Expanded(child: EmailView()),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: controller.scaffoldKey,
|
|
||||||
drawer: ResponsiveWidget(
|
|
||||||
responsiveUtils: responsiveUtils,
|
|
||||||
mobile: SizedBox(child: MailboxView(), width: double.infinity),
|
|
||||||
landscapeMobile: SizedBox(
|
|
||||||
child: MailboxView(),
|
|
||||||
width: ResponsiveUtils.defaultSizeDrawer),
|
|
||||||
tablet: SizedBox(
|
|
||||||
child: MailboxView(),
|
|
||||||
width: ResponsiveUtils.defaultSizeDrawer),
|
|
||||||
landscapeTablet: SizedBox(
|
|
||||||
child: MailboxView(),
|
|
||||||
width: ResponsiveUtils.defaultSizeLeftMenuMobile),
|
|
||||||
tabletLarge: SizedBox(
|
|
||||||
child: MailboxView(),
|
|
||||||
width: ResponsiveUtils.defaultSizeLeftMenuMobile),
|
|
||||||
desktop: SizedBox(
|
|
||||||
child: MailboxView(),
|
|
||||||
width: ResponsiveUtils.defaultSizeLeftMenuMobile)),
|
|
||||||
drawerEnableOpenDragGesture: responsiveUtils.hasLeftMenuDrawerActive(context),
|
drawerEnableOpenDragGesture: responsiveUtils.hasLeftMenuDrawerActive(context),
|
||||||
body: Stack(children: [
|
body: Stack(children: [
|
||||||
Obx(() {
|
Obx(() {
|
||||||
@@ -61,7 +42,7 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
landscapeTablet: controller.searchController.isSearchEmailRunning
|
landscapeTablet: controller.searchController.isSearchEmailRunning
|
||||||
? EmailView()
|
? EmailView()
|
||||||
: bodyLandscapeTablet,
|
: bodyLandscapeTablet,
|
||||||
mobile: ThreadView());
|
mobile: _buildScaffoldHaveDrawer(body: ThreadView()));
|
||||||
case DashboardRoutes.emailDetailed:
|
case DashboardRoutes.emailDetailed:
|
||||||
return ResponsiveWidget(
|
return ResponsiveWidget(
|
||||||
responsiveUtils: responsiveUtils,
|
responsiveUtils: responsiveUtils,
|
||||||
@@ -89,10 +70,35 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
landscapeTablet: controller.searchController.isSearchEmailRunning
|
landscapeTablet: controller.searchController.isSearchEmailRunning
|
||||||
? EmailView()
|
? EmailView()
|
||||||
: bodyLandscapeTablet,
|
: bodyLandscapeTablet,
|
||||||
mobile: ThreadView());
|
mobile: _buildScaffoldHaveDrawer(body: ThreadView()));
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_buildScaffoldHaveDrawer({required Widget body}) {
|
||||||
|
return Scaffold(
|
||||||
|
key: controller.scaffoldKey,
|
||||||
|
body: body,
|
||||||
|
drawer: ResponsiveWidget(
|
||||||
|
responsiveUtils: responsiveUtils,
|
||||||
|
mobile: SizedBox(child: MailboxView(), width: double.infinity),
|
||||||
|
landscapeMobile: SizedBox(
|
||||||
|
child: MailboxView(),
|
||||||
|
width: ResponsiveUtils.defaultSizeDrawer),
|
||||||
|
tablet: SizedBox(
|
||||||
|
child: MailboxView(),
|
||||||
|
width: ResponsiveUtils.defaultSizeDrawer),
|
||||||
|
landscapeTablet: SizedBox(
|
||||||
|
child: MailboxView(),
|
||||||
|
width: ResponsiveUtils.defaultSizeLeftMenuMobile),
|
||||||
|
tabletLarge: SizedBox(
|
||||||
|
child: MailboxView(),
|
||||||
|
width: ResponsiveUtils.defaultSizeLeftMenuMobile),
|
||||||
|
desktop: SizedBox(
|
||||||
|
child: MailboxView(),
|
||||||
|
width: ResponsiveUtils.defaultSizeLeftMenuMobile)),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -49,21 +49,12 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Portal(
|
||||||
key: controller.scaffoldKey,
|
child: Stack(children: [
|
||||||
backgroundColor: Colors.white,
|
ResponsiveWidget(
|
||||||
drawer: ResponsiveWidget(
|
responsiveUtils: responsiveUtils,
|
||||||
responsiveUtils: responsiveUtils,
|
desktop: Scaffold(
|
||||||
mobile: SizedBox(child: MailboxView(), width: ResponsiveUtils.defaultSizeDrawer),
|
body: Container(
|
||||||
tablet: SizedBox(child: MailboxView(), width: ResponsiveUtils.defaultSizeDrawer),
|
|
||||||
tabletLarge: SizedBox(child: MailboxView(), width: ResponsiveUtils.defaultSizeLeftMenuMobile),
|
|
||||||
desktop: const SizedBox.shrink()),
|
|
||||||
drawerEnableOpenDragGesture: !responsiveUtils.isDesktop(context),
|
|
||||||
body: Portal(
|
|
||||||
child: Stack(children: [
|
|
||||||
ResponsiveWidget(
|
|
||||||
responsiveUtils: responsiveUtils,
|
|
||||||
desktop: Container(
|
|
||||||
color: AppColor.colorBgDesktop,
|
color: AppColor.colorBgDesktop,
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Row(children: [
|
Row(children: [
|
||||||
@@ -135,14 +126,16 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
))
|
))
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
tabletLarge: Obx(() {
|
),
|
||||||
switch(controller.dashboardRoute.value) {
|
tabletLarge: Obx(() {
|
||||||
case DashboardRoutes.searchEmail:
|
switch(controller.dashboardRoute.value) {
|
||||||
return SearchEmailView();
|
case DashboardRoutes.searchEmail:
|
||||||
case DashboardRoutes.emailDetailed:
|
return SearchEmailView();
|
||||||
return controller.searchController.isSearchEmailRunning
|
case DashboardRoutes.emailDetailed:
|
||||||
? EmailView()
|
return controller.searchController.isSearchEmailRunning
|
||||||
: Row(
|
? EmailView()
|
||||||
|
: _buildScaffoldHaveDrawer(
|
||||||
|
body: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@@ -150,9 +143,11 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
child: ThreadView()),
|
child: ThreadView()),
|
||||||
Expanded(child: EmailView()),
|
Expanded(child: EmailView()),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
default:
|
);
|
||||||
return Row(
|
default:
|
||||||
|
return _buildScaffoldHaveDrawer(
|
||||||
|
body: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@@ -160,28 +155,41 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
child: ThreadView()),
|
child: ThreadView()),
|
||||||
Expanded(child: EmailView()),
|
Expanded(child: EmailView()),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
}
|
);
|
||||||
}),
|
}
|
||||||
mobile: Obx(() {
|
}),
|
||||||
switch(controller.dashboardRoute.value) {
|
mobile: Obx(() {
|
||||||
case DashboardRoutes.thread:
|
switch(controller.dashboardRoute.value) {
|
||||||
return ThreadView();
|
case DashboardRoutes.thread:
|
||||||
case DashboardRoutes.emailDetailed:
|
return _buildScaffoldHaveDrawer(body: ThreadView());
|
||||||
return EmailView();
|
case DashboardRoutes.emailDetailed:
|
||||||
case DashboardRoutes.searchEmail:
|
return EmailView();
|
||||||
return SearchEmailView();
|
case DashboardRoutes.searchEmail:
|
||||||
default:
|
return SearchEmailView();
|
||||||
return ThreadView();
|
default:
|
||||||
}
|
return _buildScaffoldHaveDrawer(body: ThreadView());
|
||||||
}),
|
}
|
||||||
),
|
}),
|
||||||
Obx(() => controller.composerOverlayState.value == ComposerOverlayState.active
|
),
|
||||||
? ComposerView()
|
Obx(() => controller.composerOverlayState.value == ComposerOverlayState.active
|
||||||
: const SizedBox.shrink()),
|
? ComposerView()
|
||||||
_buildDownloadTaskStateWidget(),
|
: const SizedBox.shrink()),
|
||||||
]),
|
_buildDownloadTaskStateWidget(),
|
||||||
),
|
]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildScaffoldHaveDrawer({required Widget body}) {
|
||||||
|
return Scaffold(
|
||||||
|
key: controller.scaffoldKey,
|
||||||
|
drawer: ResponsiveWidget(
|
||||||
|
responsiveUtils: responsiveUtils,
|
||||||
|
mobile: SizedBox(child: MailboxView(), width: ResponsiveUtils.defaultSizeDrawer),
|
||||||
|
tablet: SizedBox(child: MailboxView(), width: ResponsiveUtils.defaultSizeDrawer),
|
||||||
|
tabletLarge: SizedBox(child: MailboxView(), width: ResponsiveUtils.defaultSizeLeftMenuMobile),
|
||||||
|
desktop: const SizedBox.shrink()),
|
||||||
|
body: body,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user