TF-1257 Resize to smaller quotas bar
This commit is contained in:
@@ -58,15 +58,13 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
child: RefreshIndicator(
|
child: RefreshIndicator(
|
||||||
color: AppColor.primaryColor,
|
color: AppColor.primaryColor,
|
||||||
onRefresh: () async => controller.refreshAllMailbox(),
|
onRefresh: () async => controller.refreshAllMailbox(),
|
||||||
child: SafeArea(top: false, right: false,
|
child: SafeArea(
|
||||||
bottom: !controller.isSelectionEnabled(),
|
top: false,
|
||||||
|
right: false,
|
||||||
|
bottom: false,
|
||||||
child: controller.isSearchActive()
|
child: controller.isSearchActive()
|
||||||
? _buildListMailboxSearched(context)
|
? _buildListMailboxSearched(context)
|
||||||
: Padding(
|
: _buildListMailbox(context)
|
||||||
padding: EdgeInsets.only(
|
|
||||||
bottom: _responsiveUtils.isLandscapeMobile(context)
|
|
||||||
|| controller.isSelectionEnabled() ? 0 : 24),
|
|
||||||
child: _buildListMailbox(context))
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
))),
|
))),
|
||||||
@@ -75,8 +73,10 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
: const SizedBox.shrink()),
|
: const SizedBox.shrink()),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
Obx(() => controller.isMailboxListScrollable.isTrue && !controller.isSelectionEnabled()
|
Obx(() => controller.isMailboxListScrollable.isTrue
|
||||||
? const QuotasFooterWidget(padding: EdgeInsets.only(left: 24, right: 24, bottom: 8))
|
&& !controller.isSearchActive()
|
||||||
|
&& !controller.isSelectionEnabled()
|
||||||
|
? const QuotasFooterWidget()
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
@@ -87,9 +87,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
if (_responsiveUtils.isLandscapeMobile(context)) {
|
if (_responsiveUtils.isLandscapeMobile(context)) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
return Align(
|
return _buildVersionInformation(context, appInformation);
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
child: _buildVersionInformation(context, appInformation));
|
|
||||||
} else {
|
} else {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
@@ -225,7 +223,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
controller: controller.mailboxListScrollController,
|
controller: controller.mailboxListScrollController,
|
||||||
key: const PageStorageKey('mailbox_list'),
|
key: const PageStorageKey('mailbox_list'),
|
||||||
physics: const ClampingScrollPhysics(),
|
physics: const ClampingScrollPhysics(),
|
||||||
padding: EdgeInsets.only(bottom: controller.isSelectionEnabled() ? 16 : 0),
|
padding: const EdgeInsets.only(bottom: 16),
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Obx(() {
|
Obx(() {
|
||||||
if (controller.isSelectionEnabled() && _responsiveUtils.isLandscapeMobile(context)) {
|
if (controller.isSelectionEnabled() && _responsiveUtils.isLandscapeMobile(context)) {
|
||||||
@@ -242,8 +240,10 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
Obx(() => controller.folderMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
Obx(() => controller.folderMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
||||||
? _buildMailboxCategory(context, MailboxCategories.folders, controller.folderMailboxTree.value.root)
|
? _buildMailboxCategory(context, MailboxCategories.folders, controller.folderMailboxTree.value.root)
|
||||||
: const SizedBox.shrink()),
|
: const SizedBox.shrink()),
|
||||||
Obx(() => controller.isMailboxListScrollable.isFalse && !controller.isSelectionEnabled()
|
Obx(() => controller.isMailboxListScrollable.isFalse
|
||||||
? const QuotasFooterWidget(padding: EdgeInsets.only(left: 24, right: 24, bottom: 8, top: 8))
|
&& !controller.isSearchActive()
|
||||||
|
&& !controller.isSelectionEnabled()
|
||||||
|
? const QuotasFooterWidget()
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -7,15 +7,21 @@ import 'package:tmail_ui_user/features/quotas/presentation/quotas_controller.dar
|
|||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
class QuotasFooterWidget extends GetWidget<QuotasController> {
|
class QuotasFooterWidget extends GetWidget<QuotasController> {
|
||||||
const QuotasFooterWidget({Key? key, this.padding}) : super(key: key);
|
|
||||||
final EdgeInsetsGeometry? padding;
|
const QuotasFooterWidget({
|
||||||
|
Key? key,
|
||||||
|
this.padding
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final EdgeInsets? padding;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Obx(
|
return Obx(
|
||||||
() => controller.quotasState.value != QuotasState.notAvailable
|
() => controller.quotasState.value != QuotasState.notAvailable
|
||||||
? Container(
|
? Container(
|
||||||
color: AppColor.colorBgDesktop,
|
color: AppColor.colorBgDesktop,
|
||||||
padding: padding ?? const EdgeInsets.all(24),
|
padding: padding ?? const EdgeInsets.symmetric(vertical: 12, horizontal: 24),
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: IntrinsicWidth(
|
child: IntrinsicWidth(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
Reference in New Issue
Block a user