TF-168 [BUG] Hiding all view components without when login implementation
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
// import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
typedef OnTapAvatarActionClick = void Function();
|
||||
|
||||
@@ -8,7 +8,7 @@ class AvatarBuilder {
|
||||
Key? _key;
|
||||
String? _text;
|
||||
double? _size;
|
||||
String? _iconStatus;
|
||||
// String? _iconStatus;
|
||||
Color? _bgColor;
|
||||
OnTapAvatarActionClick? _onTapAvatarActionClick;
|
||||
|
||||
@@ -27,10 +27,10 @@ class AvatarBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
AvatarBuilder iconStatus(String iconStatus) {
|
||||
_iconStatus = iconStatus;
|
||||
return this;
|
||||
}
|
||||
// AvatarBuilder iconStatus(String iconStatus) {
|
||||
// _iconStatus = iconStatus;
|
||||
// return this;
|
||||
// }
|
||||
|
||||
AvatarBuilder backgroundColor(Color bgColor) {
|
||||
_bgColor = bgColor;
|
||||
@@ -66,10 +66,10 @@ class AvatarBuilder {
|
||||
child: Text(
|
||||
'${_text ?? ''}',
|
||||
style: TextStyle(fontSize: 20, color: AppColor.avatarTextColor, fontWeight: FontWeight.w500))),
|
||||
if (_iconStatus != null && _iconStatus!.isNotEmpty)
|
||||
Align(
|
||||
child: SvgPicture.asset(_iconStatus!, width: 12, height: 12, fit: BoxFit.fill),
|
||||
alignment: Alignment.bottomRight)
|
||||
// if (_iconStatus != null && _iconStatus!.isNotEmpty)
|
||||
// Align(
|
||||
// child: SvgPicture.asset(_iconStatus!, width: 12, height: 12, fit: BoxFit.fill),
|
||||
// alignment: Alignment.bottomRight)
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
||||
@@ -69,12 +69,12 @@ class TopBarComposerWidgetBuilder {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(
|
||||
key: Key('button_file_share'),
|
||||
color: AppColor.baseTextColor,
|
||||
icon: SvgPicture.asset(_imagePaths.icComposerFileShare, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
onPressed: () {}
|
||||
),
|
||||
// IconButton(
|
||||
// key: Key('button_file_share'),
|
||||
// color: AppColor.baseTextColor,
|
||||
// icon: SvgPicture.asset(_imagePaths.icComposerFileShare, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
// onPressed: () {}
|
||||
// ),
|
||||
IconButton(
|
||||
key: Key('button_attachment'),
|
||||
color: AppColor.baseTextColor,
|
||||
@@ -98,12 +98,13 @@ class TopBarComposerWidgetBuilder {
|
||||
}
|
||||
}
|
||||
),
|
||||
IconButton(
|
||||
key: Key('button_menu_composer'),
|
||||
color: AppColor.baseTextColor,
|
||||
icon: SvgPicture.asset(_imagePaths.icComposerMenu, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
onPressed: () {}
|
||||
)
|
||||
SizedBox(width: 8)
|
||||
// IconButton(
|
||||
// key: Key('button_menu_composer'),
|
||||
// color: AppColor.baseTextColor,
|
||||
// icon: SvgPicture.asset(_imagePaths.icComposerMenu, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
// onPressed: () {}
|
||||
// )
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -86,14 +86,14 @@ class AppBarMailWidgetBuilder {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(
|
||||
color: AppColor.baseTextColor,
|
||||
icon: SvgPicture.asset(_imagePaths.icTrash, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
onPressed: () {
|
||||
if (_onBackActionClick != null) {
|
||||
_onBackActionClick!();
|
||||
}
|
||||
}),
|
||||
// IconButton(
|
||||
// color: AppColor.baseTextColor,
|
||||
// icon: SvgPicture.asset(_imagePaths.icTrash, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
// onPressed: () {
|
||||
// if (_onBackActionClick != null) {
|
||||
// _onBackActionClick!();
|
||||
// }
|
||||
// }),
|
||||
IconButton(
|
||||
key: Key('button_mark_as_unread_email'),
|
||||
color: AppColor.baseTextColor,
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ class SenderAndReceiverInformationTileBuilder {
|
||||
child: AvatarBuilder()
|
||||
.text('${_presentationEmail!.getAvatarText()}')
|
||||
.size(40)
|
||||
.iconStatus(_imagePaths.icOffline)
|
||||
// .iconStatus(_imagePaths.icOffline)
|
||||
.build()),
|
||||
title: Transform(
|
||||
transform: Matrix4.translationValues(-15.0, 0.0, 0.0),
|
||||
|
||||
@@ -1,38 +1,3 @@
|
||||
// LinShare is an open source filesharing software, part of the LinPKI software
|
||||
// suite, developed by Linagora.
|
||||
//
|
||||
// Copyright (C) 2020 LINAGORA
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify it under the
|
||||
// terms of the GNU Affero General Public License as published by the Free Software
|
||||
// Foundation, either version 3 of the License, or (at your option) any later version,
|
||||
// provided you comply with the Additional Terms applicable for LinShare software by
|
||||
// Linagora pursuant to Section 7 of the GNU Affero General Public License,
|
||||
// subsections (b), (c), and (e), pursuant to which you must notably (i) retain the
|
||||
// display in the interface of the “LinShare™” trademark/logo, the "Libre & Free" mention,
|
||||
// the words “You are using the Free and Open Source version of LinShare™, powered by
|
||||
// Linagora © 2009–2020. Contribute to Linshare R&D by subscribing to an Enterprise
|
||||
// offer!”. You must also retain the latter notice in all asynchronous messages such as
|
||||
// e-mails sent with the Program, (ii) retain all hypertext links between LinShare and
|
||||
// http://www.linshare.org, between linagora.com and Linagora, and (iii) refrain from
|
||||
// infringing Linagora intellectual property rights over its trademarks and commercial
|
||||
// brands. Other Additional Terms apply, see
|
||||
// <http://www.linshare.org/licenses/LinShare-License_AfferoGPL-v3.pdf
|
||||
//
|
||||
// for more details.
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||
// more details.
|
||||
// You should have received a copy of the GNU Affero General Public License and its
|
||||
// applicable Additional Terms for LinShare along with this program. If not, see
|
||||
// <http://www.gnu.org/licenses
|
||||
// for the GNU Affero General Public License version
|
||||
//
|
||||
// 3 and <http://www.linshare.org/licenses/LinShare-License_AfferoGPL-v3.pdf
|
||||
// for
|
||||
//
|
||||
// the Additional Terms applicable to LinShare software.
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -5,11 +5,11 @@ import 'package:get/get.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/mailbox_controller.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_node.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/mailbox_button_new_folder_builder.dart';
|
||||
// import 'package:tmail_ui_user/features/mailbox/presentation/widgets/mailbox_button_new_folder_builder.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/mailbox_folder_tile_builder.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/mailbox_tile_builder.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/search_form_widget_builder.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/storage_widget_builder.dart';
|
||||
// import 'package:tmail_ui_user/features/mailbox/presentation/widgets/search_form_widget_builder.dart';
|
||||
// import 'package:tmail_ui_user/features/mailbox/presentation/widgets/storage_widget_builder.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/user_information_widget_builder.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
@@ -44,7 +44,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildHeaderMailbox(context),
|
||||
_buildSearchFormWidget(context),
|
||||
// _buildSearchFormWidget(context),
|
||||
_buildLoadingView(),
|
||||
_buildListMailbox(context)
|
||||
]
|
||||
@@ -54,7 +54,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
||||
)
|
||||
)
|
||||
)),
|
||||
bottomNavigationBar: responsiveUtils.isMobile(context) ? _buildStorageWidget(context) : null
|
||||
// bottomNavigationBar: responsiveUtils.isMobile(context) ? _buildStorageWidget(context) : null
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -91,18 +91,18 @@ class MailboxView extends GetWidget<MailboxController> {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 16, top: 8.0, right: 16),
|
||||
child: Obx(() => UserInformationWidgetBuilder(
|
||||
imagePaths,
|
||||
// imagePaths,
|
||||
controller.mailboxDashBoardController.userProfile.value)
|
||||
.build()));
|
||||
}
|
||||
|
||||
Widget _buildSearchFormWidget(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 16, left: 16, right: 16),
|
||||
child: SearchFormWidgetBuilder(context, imagePaths)
|
||||
.onNewSearchQuery((searchQuery) => {})
|
||||
.build());
|
||||
}
|
||||
// Widget _buildSearchFormWidget(BuildContext context) {
|
||||
// return Padding(
|
||||
// padding: EdgeInsets.only(top: 16, left: 16, right: 16),
|
||||
// child: SearchFormWidgetBuilder(context, imagePaths)
|
||||
// .onNewSearchQuery((searchQuery) => {})
|
||||
// .build());
|
||||
// }
|
||||
|
||||
Widget _buildLoadingView() {
|
||||
return Obx(() => controller.viewState.value.fold(
|
||||
@@ -135,16 +135,17 @@ class MailboxView extends GetWidget<MailboxController> {
|
||||
maxLines: 1,
|
||||
style: TextStyle(fontSize: 12, color: AppColor.myFolderTitleColor, fontWeight: FontWeight.w500))
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 8,
|
||||
right: 16,
|
||||
top: 10),
|
||||
child: (MailboxNewFolderTileBuilder()
|
||||
..addIcon(imagePaths.icMailboxNewFolder)
|
||||
..addName(AppLocalizations.of(context).new_folder))
|
||||
.build()
|
||||
),
|
||||
// Padding(
|
||||
// padding: EdgeInsets.only(
|
||||
// left: 8,
|
||||
// right: 16,
|
||||
// top: 10),
|
||||
// child: (MailboxNewFolderTileBuilder()
|
||||
// ..addIcon(imagePaths.icMailboxNewFolder)
|
||||
// ..addName(AppLocalizations.of(context).new_folder))
|
||||
// .build()
|
||||
// ),
|
||||
SizedBox(height: 10),
|
||||
_buildFolderMailbox(context),
|
||||
]
|
||||
);
|
||||
@@ -221,5 +222,5 @@ class MailboxView extends GetWidget<MailboxController> {
|
||||
.toList();
|
||||
}
|
||||
|
||||
Widget _buildStorageWidget(BuildContext context) => StorageWidgetBuilder(context).build();
|
||||
// Widget _buildStorageWidget(BuildContext context) => StorageWidgetBuilder(context).build();
|
||||
}
|
||||
@@ -3,18 +3,21 @@ import 'dart:ui';
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
// import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:model/model.dart';
|
||||
|
||||
typedef OnOpenUserInformationActionClick = void Function();
|
||||
|
||||
class UserInformationWidgetBuilder {
|
||||
final ImagePaths _imagePaths;
|
||||
// final ImagePaths _imagePaths;
|
||||
final UserProfile? _userProfile;
|
||||
|
||||
OnOpenUserInformationActionClick? _onOpenUserInformationActionClick;
|
||||
|
||||
UserInformationWidgetBuilder(this._imagePaths, this._userProfile);
|
||||
UserInformationWidgetBuilder(
|
||||
// this._imagePaths,
|
||||
this._userProfile
|
||||
);
|
||||
|
||||
UserInformationWidgetBuilder onOpenUserInformationAction(
|
||||
OnOpenUserInformationActionClick onOpenUserInformationActionClick) {
|
||||
@@ -46,12 +49,12 @@ class UserInformationWidgetBuilder {
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(fontSize: 16, color: AppColor.nameUserColor, fontWeight: FontWeight.w500),
|
||||
)),
|
||||
trailing: Transform(
|
||||
transform: Matrix4.translationValues(0.0, 0.0, 0.0),
|
||||
child: IconButton(
|
||||
icon: SvgPicture.asset(_imagePaths.icNextArrow, width: 7, height: 12, fit: BoxFit.fill),
|
||||
onPressed: () => {}))),
|
||||
))),
|
||||
// trailing: Transform(
|
||||
// transform: Matrix4.translationValues(0.0, 0.0, 0.0),
|
||||
// child: IconButton(
|
||||
// icon: SvgPicture.asset(_imagePaths.icNextArrow, width: 7, height: 12, fit: BoxFit.fill),
|
||||
// onPressed: () => {}))),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -71,12 +71,12 @@ class ThreadView extends GetWidget<ThreadController> {
|
||||
padding: EdgeInsets.only(left: 15, right: 12),
|
||||
child: (AppBarThreadWidgetBuilder(
|
||||
context,
|
||||
imagePaths,
|
||||
// imagePaths,
|
||||
responsiveUtils,
|
||||
controller.mailboxDashBoardController.selectedMailbox.value,
|
||||
controller.mailboxDashBoardController.userProfile.value)
|
||||
..onOpenUserInformationAction(() => {})
|
||||
..onOpenSearchMailActionClick(() => {})
|
||||
// ..onOpenSearchMailActionClick(() => {})
|
||||
..onOpenListMailboxActionClick(() => controller.openMailboxLeftMenu()))
|
||||
.build()));
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class ThreadView extends GetWidget<ThreadController> {
|
||||
controller.getListEmailSelected(),
|
||||
responsiveUtils)
|
||||
..addCloseActionClick(() => controller.cancelSelectEmail())
|
||||
..addRemoveEmailActionClick((listEmail) => {})
|
||||
// ..addRemoveEmailActionClick((listEmail) => {})
|
||||
..addOnMarkAsEmailReadActionClick((listEmail) => controller.markAsSelectedEmailRead(listEmail))
|
||||
..addOpenContextMenuActionClick((listEmail) =>
|
||||
controller.openContextMenuSelectedEmail(context, _contextMenuEmailActionTile(context, listEmail)))
|
||||
@@ -101,11 +101,11 @@ class ThreadView extends GetWidget<ThreadController> {
|
||||
|
||||
List<Widget> _contextMenuEmailActionTile(BuildContext context, List<PresentationEmail> listEmail) {
|
||||
return [
|
||||
_moveToTrashAction(context, listEmail),
|
||||
// _moveToTrashAction(context, listEmail),
|
||||
_moveToMailboxAction(context, listEmail),
|
||||
_markAsReadAction(context, listEmail),
|
||||
_markAsStarAction(context, listEmail),
|
||||
_moveToSpamAction(context, listEmail),
|
||||
// _moveToSpamAction(context, listEmail),
|
||||
SizedBox(height: 20),
|
||||
];
|
||||
}
|
||||
@@ -122,15 +122,15 @@ class ThreadView extends GetWidget<ThreadController> {
|
||||
.build();
|
||||
}
|
||||
|
||||
Widget _moveToTrashAction(BuildContext context, List<PresentationEmail> listEmail) {
|
||||
return (EmailContextMenuActionBuilder(
|
||||
Key('move_to_trash_context_menu_action'),
|
||||
SvgPicture.asset(imagePaths.icTrash, width: 24, height: 24, fit: BoxFit.fill),
|
||||
AppLocalizations.of(context).move_to_trash,
|
||||
listEmail)
|
||||
..onActionClick((data) => {}))
|
||||
.build();
|
||||
}
|
||||
// Widget _moveToTrashAction(BuildContext context, List<PresentationEmail> listEmail) {
|
||||
// return (EmailContextMenuActionBuilder(
|
||||
// Key('move_to_trash_context_menu_action'),
|
||||
// SvgPicture.asset(imagePaths.icTrash, width: 24, height: 24, fit: BoxFit.fill),
|
||||
// AppLocalizations.of(context).move_to_trash,
|
||||
// listEmail)
|
||||
// ..onActionClick((data) => {}))
|
||||
// .build();
|
||||
// }
|
||||
|
||||
Widget _moveToMailboxAction(BuildContext context, List<PresentationEmail> listEmail) {
|
||||
return (EmailContextMenuActionBuilder(
|
||||
@@ -160,23 +160,23 @@ class ThreadView extends GetWidget<ThreadController> {
|
||||
.build();
|
||||
}
|
||||
|
||||
Widget _moveToSpamAction(BuildContext context, List<PresentationEmail> listEmail) {
|
||||
return (EmailContextMenuActionBuilder(
|
||||
Key('move_to_spam_context_menu_action'),
|
||||
SvgPicture.asset(imagePaths.icMailboxSpam, width: 24, height: 24, fit: BoxFit.fill),
|
||||
AppLocalizations.of(context).move_to_spam,
|
||||
listEmail)
|
||||
..onActionClick((data) => {}))
|
||||
.build();
|
||||
}
|
||||
// Widget _moveToSpamAction(BuildContext context, List<PresentationEmail> listEmail) {
|
||||
// return (EmailContextMenuActionBuilder(
|
||||
// Key('move_to_spam_context_menu_action'),
|
||||
// SvgPicture.asset(imagePaths.icMailboxSpam, width: 24, height: 24, fit: BoxFit.fill),
|
||||
// AppLocalizations.of(context).move_to_spam,
|
||||
// listEmail)
|
||||
// ..onActionClick((data) => {}))
|
||||
// .build();
|
||||
// }
|
||||
|
||||
List<PopupMenuItem> _popupMenuEmailActionTile(BuildContext context, List<PresentationEmail> listEmail) {
|
||||
return [
|
||||
PopupMenuItem(child: _moveToTrashAction(context, listEmail)),
|
||||
// PopupMenuItem(child: _moveToTrashAction(context, listEmail)),
|
||||
PopupMenuItem(child: _moveToMailboxAction(context, listEmail)),
|
||||
PopupMenuItem(child: _markAsReadAction(context, listEmail)),
|
||||
PopupMenuItem(child: _markAsStarAction(context, listEmail)),
|
||||
PopupMenuItem(child: _moveToSpamAction(context, listEmail)),
|
||||
// PopupMenuItem(child: _moveToSpamAction(context, listEmail)),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -15,7 +15,7 @@ typedef OnOpenPopupMenuActionClick = void Function(List<PresentationEmail> listE
|
||||
class AppBarThreadSelectModeActiveBuilder {
|
||||
OnCloseActionClick? _onCloseActionClick;
|
||||
OnMarkAsEmailReadActionClick? _onMarkAsEmailReadActionClick;
|
||||
OnRemoveEmailActionClick? _onRemoveEmailActionClick;
|
||||
// OnRemoveEmailActionClick? _onRemoveEmailActionClick;
|
||||
OnOpenContextMenuActionClick? _onOpenContextMenuActionClick;
|
||||
OnOpenPopupMenuActionClick? _onOpenPopupMenuActionClick;
|
||||
|
||||
@@ -34,9 +34,9 @@ class AppBarThreadSelectModeActiveBuilder {
|
||||
_onMarkAsEmailReadActionClick = onMarkAsEmailReadActionClick;
|
||||
}
|
||||
|
||||
void addRemoveEmailActionClick(OnRemoveEmailActionClick onRemoveEmailActionClick) {
|
||||
_onRemoveEmailActionClick = onRemoveEmailActionClick;
|
||||
}
|
||||
// void addRemoveEmailActionClick(OnRemoveEmailActionClick onRemoveEmailActionClick) {
|
||||
// _onRemoveEmailActionClick = onRemoveEmailActionClick;
|
||||
// }
|
||||
|
||||
void addOpenContextMenuActionClick(OnOpenContextMenuActionClick onOpenContextMenuActionClick) {
|
||||
_onOpenContextMenuActionClick = onOpenContextMenuActionClick;
|
||||
@@ -93,15 +93,15 @@ class AppBarThreadSelectModeActiveBuilder {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(
|
||||
key: Key('button_remove_email_selected'),
|
||||
color: AppColor.baseTextColor,
|
||||
icon: SvgPicture.asset(_imagePaths.icTrash, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
onPressed: () => {
|
||||
if (_onRemoveEmailActionClick != null) {
|
||||
_onRemoveEmailActionClick!(_listEmail)
|
||||
}
|
||||
}),
|
||||
// IconButton(
|
||||
// key: Key('button_remove_email_selected'),
|
||||
// color: AppColor.baseTextColor,
|
||||
// icon: SvgPicture.asset(_imagePaths.icTrash, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
// onPressed: () => {
|
||||
// if (_onRemoveEmailActionClick != null) {
|
||||
// _onRemoveEmailActionClick!(_listEmail)
|
||||
// }
|
||||
// }),
|
||||
IconButton(
|
||||
key: Key('button_unread_email_selected'),
|
||||
color: AppColor.baseTextColor,
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'dart:ui';
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
// import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:model/mailbox/presentation_mailbox.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
@@ -13,19 +13,19 @@ typedef OnOpenListMailboxActionClick = void Function();
|
||||
typedef OnOpenUserInformationActionClick = void Function();
|
||||
|
||||
class AppBarThreadWidgetBuilder {
|
||||
OnOpenSearchMailActionClick? _onOpenSearchMailActionClick;
|
||||
// OnOpenSearchMailActionClick? _onOpenSearchMailActionClick;
|
||||
OnOpenListMailboxActionClick? _onOpenListMailboxActionClick;
|
||||
OnOpenUserInformationActionClick? _onOpenUserInformationActionClick;
|
||||
|
||||
final BuildContext _context;
|
||||
final ImagePaths _imagePaths;
|
||||
// final ImagePaths _imagePaths;
|
||||
final ResponsiveUtils _responsiveUtils;
|
||||
final PresentationMailbox? _presentationMailbox;
|
||||
final UserProfile? _userProfile;
|
||||
|
||||
AppBarThreadWidgetBuilder(
|
||||
this._context,
|
||||
this._imagePaths,
|
||||
// this._imagePaths,
|
||||
this._responsiveUtils,
|
||||
this._presentationMailbox,
|
||||
this._userProfile,
|
||||
@@ -36,9 +36,9 @@ class AppBarThreadWidgetBuilder {
|
||||
_onOpenUserInformationActionClick = onOpenUserInformationActionClick;
|
||||
}
|
||||
|
||||
void onOpenSearchMailActionClick(OnOpenSearchMailActionClick onOpenSearchMailActionClick) {
|
||||
_onOpenSearchMailActionClick = onOpenSearchMailActionClick;
|
||||
}
|
||||
// void onOpenSearchMailActionClick(OnOpenSearchMailActionClick onOpenSearchMailActionClick) {
|
||||
// _onOpenSearchMailActionClick = onOpenSearchMailActionClick;
|
||||
// }
|
||||
|
||||
void onOpenListMailboxActionClick(OnOpenListMailboxActionClick onOpenListMailboxActionClick) {
|
||||
_onOpenListMailboxActionClick = onOpenListMailboxActionClick;
|
||||
@@ -48,7 +48,7 @@ class AppBarThreadWidgetBuilder {
|
||||
return Container(
|
||||
key: Key('app_bar_thread_widget'),
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(top: 8, bottom: 8),
|
||||
padding: EdgeInsets.only(top: 16, bottom: 8),
|
||||
child: MediaQuery(
|
||||
data: MediaQueryData(padding: EdgeInsets.zero),
|
||||
child: Row(
|
||||
@@ -57,7 +57,7 @@ class AppBarThreadWidgetBuilder {
|
||||
children: [
|
||||
if (_responsiveUtils.isMobile(_context)) _buildIconUser(),
|
||||
Expanded(child: _buildContentCenterAppBar()),
|
||||
_buildIconSearch(),
|
||||
// _buildIconSearch(),
|
||||
]
|
||||
)
|
||||
)
|
||||
@@ -78,19 +78,19 @@ class AppBarThreadWidgetBuilder {
|
||||
.build()));
|
||||
}
|
||||
|
||||
Widget _buildIconSearch() {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 16),
|
||||
child: IconButton(
|
||||
color: AppColor.baseTextColor,
|
||||
icon: SvgPicture.asset(_imagePaths.icSearch, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
onPressed: () => {
|
||||
if (_onOpenSearchMailActionClick != null) {
|
||||
_onOpenSearchMailActionClick!()
|
||||
}
|
||||
}
|
||||
));
|
||||
}
|
||||
// Widget _buildIconSearch() {
|
||||
// return Padding(
|
||||
// padding: EdgeInsets.only(left: 16),
|
||||
// child: IconButton(
|
||||
// color: AppColor.baseTextColor,
|
||||
// icon: SvgPicture.asset(_imagePaths.icSearch, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
// onPressed: () => {
|
||||
// if (_onOpenSearchMailActionClick != null) {
|
||||
// _onOpenSearchMailActionClick!()
|
||||
// }
|
||||
// }
|
||||
// ));
|
||||
// }
|
||||
|
||||
Widget _buildContentCenterAppBar() {
|
||||
return Row(
|
||||
|
||||
@@ -174,7 +174,7 @@ class EmailTileBuilder {
|
||||
: AvatarBuilder()
|
||||
.text('${_presentationEmail.getAvatarText()}')
|
||||
.size(40)
|
||||
.iconStatus(_imagePaths.icOffline)
|
||||
// .iconStatus(_imagePaths.icOffline)
|
||||
.addOnTapActionClick(() {
|
||||
if (_selectModeAll == SelectMode.ACTIVE && _onSelectEmailActionClick != null) {
|
||||
_onSelectEmailActionClick!(_presentationEmail);
|
||||
@@ -185,7 +185,7 @@ class EmailTileBuilder {
|
||||
return AvatarBuilder()
|
||||
.text('${_presentationEmail.getAvatarText()}')
|
||||
.size(40)
|
||||
.iconStatus(_imagePaths.icOffline)
|
||||
// .iconStatus(_imagePaths.icOffline)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user