TF-3758 Update size for left menu on mobile
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -7,6 +7,7 @@ class ResponsiveUtils {
|
|||||||
static const double defaultSizeLeftMenuMobile = 375;
|
static const double defaultSizeLeftMenuMobile = 375;
|
||||||
static const double defaultSizeDrawer = 320;
|
static const double defaultSizeDrawer = 320;
|
||||||
static const double defaultSizeMenu = 256;
|
static const double defaultSizeMenu = 256;
|
||||||
|
static const double mobileLeftMenuSize = 339;
|
||||||
|
|
||||||
static const int heightShortest = 600;
|
static const int heightShortest = 600;
|
||||||
|
|
||||||
|
|||||||
@@ -27,97 +27,87 @@ class MailboxView extends BaseMailboxView {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ThemeUtils.setStatusBarTransparentColor();
|
return SafeArea(
|
||||||
|
child: Drawer(
|
||||||
return SafeArea(bottom: false, left: false, right: false,
|
backgroundColor: Colors.white,
|
||||||
top: controller.responsiveUtils.isMobile(context),
|
shape: InputBorder.none,
|
||||||
child: ClipRRect(
|
child: Column(
|
||||||
borderRadius: controller.responsiveUtils.isPortraitMobile(context)
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
? const BorderRadius.only(
|
children: [
|
||||||
topRight: Radius.circular(14),
|
Expanded(
|
||||||
topLeft: Radius.circular(14))
|
child: Column(children: [
|
||||||
: const BorderRadius.all(Radius.zero),
|
_buildHeaderMailbox(context),
|
||||||
child: Drawer(
|
Expanded(child: Container(
|
||||||
child: Scaffold(
|
color: Colors.white,
|
||||||
backgroundColor: Colors.white,
|
child: RefreshIndicator(
|
||||||
body: Column(
|
color: AppColor.primaryColor,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
onRefresh: controller.refreshAllMailbox,
|
||||||
children: [
|
child: SafeArea(
|
||||||
Expanded(
|
top: false,
|
||||||
child: Column(children: [
|
right: false,
|
||||||
_buildHeaderMailbox(context),
|
bottom: false,
|
||||||
Expanded(child: Container(
|
child: _buildListMailbox(context)
|
||||||
color: Colors.white,
|
)
|
||||||
child: RefreshIndicator(
|
),
|
||||||
color: AppColor.primaryColor,
|
)),
|
||||||
onRefresh: controller.refreshAllMailbox,
|
Obx(() {
|
||||||
child: SafeArea(
|
if (controller.isSelectionEnabled()
|
||||||
top: false,
|
&& controller.listActionOfMailboxSelected.isNotEmpty) {
|
||||||
right: false,
|
return SafeArea(
|
||||||
bottom: false,
|
right: false,
|
||||||
child: _buildListMailbox(context)
|
top: false,
|
||||||
)
|
child: BottomBarSelectionMailboxWidget(
|
||||||
),
|
controller.listMailboxSelected,
|
||||||
)),
|
controller.listActionOfMailboxSelected,
|
||||||
Obx(() {
|
onMailboxActionsClick: (actions, listMailboxSelected) {
|
||||||
if (controller.isSelectionEnabled()
|
return controller.pressMailboxSelectionAction(
|
||||||
&& controller.listActionOfMailboxSelected.isNotEmpty) {
|
context,
|
||||||
return SafeArea(
|
actions,
|
||||||
right: false,
|
listMailboxSelected
|
||||||
top: false,
|
|
||||||
child: BottomBarSelectionMailboxWidget(
|
|
||||||
controller.listMailboxSelected,
|
|
||||||
controller.listActionOfMailboxSelected,
|
|
||||||
onMailboxActionsClick: (actions, listMailboxSelected) {
|
|
||||||
return controller.pressMailboxSelectionAction(
|
|
||||||
context,
|
|
||||||
actions,
|
|
||||||
listMailboxSelected
|
|
||||||
);
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
if (controller.isSelectionEnabled()) {
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
|
|
||||||
return const Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Divider(color: AppColor.colorDividerHorizontal),
|
|
||||||
QuotasView()
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}),
|
}
|
||||||
Obx(() {
|
)
|
||||||
if (!controller.isSelectionEnabled() && controller.responsiveUtils.isPortraitMobile(context)) {
|
);
|
||||||
return Container(
|
} else {
|
||||||
width: double.infinity,
|
return const SizedBox.shrink();
|
||||||
color: Colors.white,
|
}
|
||||||
padding: const EdgeInsets.all(16),
|
}),
|
||||||
child: SafeArea(
|
]),
|
||||||
top: false,
|
),
|
||||||
child: ApplicationVersionWidget(
|
Obx(() {
|
||||||
padding: EdgeInsets.zero,
|
if (controller.isSelectionEnabled()) {
|
||||||
title: '${AppLocalizations.of(context).version} ',
|
return const SizedBox.shrink();
|
||||||
),
|
}
|
||||||
),
|
|
||||||
);
|
return const Column(
|
||||||
} else {
|
mainAxisSize: MainAxisSize.min,
|
||||||
return const SizedBox.shrink();
|
children: [
|
||||||
}
|
Divider(color: AppColor.colorDividerHorizontal),
|
||||||
})
|
QuotasView()
|
||||||
]),
|
],
|
||||||
)
|
);
|
||||||
)
|
}),
|
||||||
)
|
Obx(() {
|
||||||
|
if (!controller.isSelectionEnabled() && controller.responsiveUtils.isPortraitMobile(context)) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
color: Colors.white,
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: SafeArea(
|
||||||
|
top: false,
|
||||||
|
child: ApplicationVersionWidget(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
title: '${AppLocalizations.of(context).version} ',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,11 +99,7 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
drawer: ResponsiveWidget(
|
drawer: ResponsiveWidget(
|
||||||
responsiveUtils: controller.responsiveUtils,
|
responsiveUtils: controller.responsiveUtils,
|
||||||
mobile: SizedBox(
|
mobile: SizedBox(
|
||||||
width: double.infinity,
|
width: ResponsiveUtils.mobileLeftMenuSize,
|
||||||
child: MailboxView()
|
|
||||||
),
|
|
||||||
landscapeMobile: SizedBox(
|
|
||||||
width: ResponsiveUtils.defaultSizeDrawer,
|
|
||||||
child: MailboxView()
|
child: MailboxView()
|
||||||
),
|
),
|
||||||
tablet: SizedBox(
|
tablet: SizedBox(
|
||||||
|
|||||||
Reference in New Issue
Block a user