TF-1487 Apply linter rule
This commit is contained in:
@@ -43,9 +43,7 @@ class MailboxCacheDataSourceImpl extends MailboxDataSource {
|
||||
Future<void> update({List<Mailbox>? updated, List<Mailbox>? created, List<MailboxId>? destroyed}) {
|
||||
return Future.sync(() async {
|
||||
return await _mailboxCacheManager.update(updated: updated, created: created, destroyed: destroyed);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -53,9 +51,7 @@ class MailboxCacheDataSourceImpl extends MailboxDataSource {
|
||||
return Future.sync(() async {
|
||||
final listMailboxes = await _mailboxCacheManager.getAllMailbox();
|
||||
return listMailboxes;
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -35,18 +35,14 @@ class MailboxDataSourceImpl extends MailboxDataSource {
|
||||
Future<MailboxResponse> getAllMailbox(Session session, AccountId accountId, {Properties? properties}) {
|
||||
return Future.sync(() async {
|
||||
return await mailboxAPI.getAllMailbox(session, accountId, properties: properties);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<MailboxChangeResponse> getChanges(Session session, AccountId accountId, State sinceState) {
|
||||
return Future.sync(() async {
|
||||
return await mailboxAPI.getChanges(session, accountId, sinceState);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -63,36 +59,28 @@ class MailboxDataSourceImpl extends MailboxDataSource {
|
||||
Future<Mailbox?> createNewMailbox(AccountId accountId, CreateNewMailboxRequest newMailboxRequest) {
|
||||
return Future.sync(() async {
|
||||
return await mailboxAPI.createNewMailbox(accountId, newMailboxRequest);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Map<Id,SetError>> deleteMultipleMailbox(Session session, AccountId accountId, List<MailboxId> mailboxIds) {
|
||||
return Future.sync(() async {
|
||||
return await mailboxAPI.deleteMultipleMailbox(session, accountId, mailboxIds);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> renameMailbox(AccountId accountId, RenameMailboxRequest request) {
|
||||
return Future.sync(() async {
|
||||
return await mailboxAPI.renameMailbox(accountId, request);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> moveMailbox(AccountId accountId, MoveMailboxRequest request) {
|
||||
return Future.sync(() async {
|
||||
return await mailboxAPI.moveMailbox(accountId, request);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -107,26 +95,20 @@ class MailboxDataSourceImpl extends MailboxDataSource {
|
||||
mailboxId,
|
||||
totalEmailUnread,
|
||||
onProgressController);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> subscribeMailbox(AccountId accountId, SubscribeMailboxRequest request) {
|
||||
return Future.sync(() async {
|
||||
return await mailboxAPI.subscribeMailbox(accountId, request);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<MailboxId>> subscribeMultipleMailbox(AccountId accountId, SubscribeMultipleMailboxRequest subscribeRequest) {
|
||||
return Future.sync(() async {
|
||||
return await mailboxAPI.subscribeMultipleMailbox(accountId, subscribeRequest);
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,7 @@ class StateDataSourceImpl extends StateDataSource {
|
||||
return Future.sync(() async {
|
||||
final stateCache = await _stateCacheClient.getItem(stateType.value);
|
||||
return stateCache?.toState();
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -33,8 +31,6 @@ class StateDataSourceImpl extends StateDataSource {
|
||||
} else {
|
||||
return await _stateCacheClient.insertItem(stateCache.type.value, stateCache);
|
||||
}
|
||||
}).catchError((error) {
|
||||
_exceptionThrower.throwException(error);
|
||||
});
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import 'package:core/core.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/session/session.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmapState;
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap_state;
|
||||
import 'package:model/model.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/domain/model/mailbox_response.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/domain/repository/mailbox_repository.dart';
|
||||
@@ -13,7 +13,7 @@ class RefreshAllMailboxInteractor {
|
||||
|
||||
RefreshAllMailboxInteractor(this._mailboxRepository);
|
||||
|
||||
Stream<Either<Failure, Success>> execute(Session session, AccountId accountId, jmapState.State currentState) async* {
|
||||
Stream<Either<Failure, Success>> execute(Session session, AccountId accountId, jmap_state.State currentState) async* {
|
||||
try {
|
||||
yield Right<Failure, Success>(RefreshingState());
|
||||
|
||||
|
||||
@@ -207,43 +207,41 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
);
|
||||
|
||||
ever(mailboxDashBoardController.viewState, (state) {
|
||||
if (state is Either) {
|
||||
state.fold((failure) => null, (success) {
|
||||
if (success is MarkAsMultipleEmailReadAllSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MarkAsMultipleEmailReadHasSomeEmailFailure) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MoveMultipleEmailToMailboxAllSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MoveMultipleEmailToMailboxHasSomeEmailFailure) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is DeleteMultipleEmailsPermanentlyAllSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is DeleteMultipleEmailsPermanentlyHasSomeEmailFailure) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is EmptyTrashFolderSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MarkAsEmailReadSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MoveToMailboxSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is DeleteEmailPermanentlySuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is SaveEmailAsDraftsSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is RemoveEmailDraftsSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is SendEmailSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MarkAsMailboxReadAllSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MarkAsMailboxReadHasSomeEmailFailure) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is UpdateEmailDraftsSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
}
|
||||
});
|
||||
}
|
||||
state.fold((failure) => null, (success) {
|
||||
if (success is MarkAsMultipleEmailReadAllSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MarkAsMultipleEmailReadHasSomeEmailFailure) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MoveMultipleEmailToMailboxAllSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MoveMultipleEmailToMailboxHasSomeEmailFailure) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is DeleteMultipleEmailsPermanentlyAllSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is DeleteMultipleEmailsPermanentlyHasSomeEmailFailure) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is EmptyTrashFolderSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MarkAsEmailReadSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MoveToMailboxSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is DeleteEmailPermanentlySuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is SaveEmailAsDraftsSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is RemoveEmailDraftsSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is SendEmailSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MarkAsMailboxReadAllSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is MarkAsMailboxReadHasSomeEmailFailure) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
} else if (success is UpdateEmailDraftsSuccess) {
|
||||
_refreshMailboxChanges(currentMailboxState: success.currentMailboxState);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
ever(mailboxDashBoardController.dashBoardAction, (action) {
|
||||
@@ -518,7 +516,7 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
_imagePaths.icFolderMailbox,
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: Colors.white,
|
||||
colorFilter: Colors.white.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
backgroundColor: AppColor.toastSuccessBackgroundColor,
|
||||
textColor: Colors.white,
|
||||
@@ -544,7 +542,7 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
_imagePaths.icNotConnection,
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: Colors.white,
|
||||
colorFilter: Colors.white.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
backgroundColor: AppColor.toastErrorBackgroundColor,
|
||||
textColor: Colors.white,
|
||||
@@ -828,7 +826,7 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
_imagePaths.icFolderMailbox,
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: Colors.white,
|
||||
colorFilter: Colors.white.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
backgroundColor: AppColor.toastSuccessBackgroundColor,
|
||||
textColor: Colors.white,
|
||||
@@ -1029,9 +1027,9 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
}
|
||||
|
||||
void _unsubscribeMailboxAction(MailboxId mailboxId) {
|
||||
final _accountId = mailboxDashBoardController.accountId.value;
|
||||
final accountId = mailboxDashBoardController.accountId.value;
|
||||
|
||||
if (_accountId != null) {
|
||||
if (accountId != null) {
|
||||
final subscribeRequest = generateSubscribeRequest(
|
||||
mailboxId,
|
||||
MailboxSubscribeState.disabled,
|
||||
@@ -1039,9 +1037,9 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
);
|
||||
|
||||
if (subscribeRequest is SubscribeMultipleMailboxRequest) {
|
||||
consumeState(_subscribeMultipleMailboxInteractor.execute(_accountId, subscribeRequest));
|
||||
consumeState(_subscribeMultipleMailboxInteractor.execute(accountId, subscribeRequest));
|
||||
} else if (subscribeRequest is SubscribeMailboxRequest) {
|
||||
consumeState(_subscribeMailboxInteractor.execute(_accountId, subscribeRequest));
|
||||
consumeState(_subscribeMailboxInteractor.execute(accountId, subscribeRequest));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1120,7 +1118,7 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
_imagePaths.icFolderMailbox,
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: Colors.white,
|
||||
colorFilter: Colors.white.asFilter(),
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
backgroundColor: AppColor.toastSuccessBackgroundColor,
|
||||
@@ -1136,9 +1134,9 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
MailboxId mailboxIdSubscribed,
|
||||
{List<MailboxId>? listDescendantMailboxIds}
|
||||
) {
|
||||
final _accountId = mailboxDashBoardController.accountId.value;
|
||||
final accountId = mailboxDashBoardController.accountId.value;
|
||||
|
||||
if (_accountId != null) {
|
||||
if (accountId != null) {
|
||||
SubscribeRequest? subscribeRequest;
|
||||
|
||||
if (listDescendantMailboxIds != null) {
|
||||
@@ -1157,9 +1155,9 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
|
||||
}
|
||||
|
||||
if (subscribeRequest is SubscribeMultipleMailboxRequest) {
|
||||
consumeState(_subscribeMultipleMailboxInteractor.execute(_accountId, subscribeRequest));
|
||||
consumeState(_subscribeMultipleMailboxInteractor.execute(accountId, subscribeRequest));
|
||||
} else if (subscribeRequest is SubscribeMailboxRequest) {
|
||||
consumeState(_subscribeMailboxInteractor.execute(_accountId, subscribeRequest));
|
||||
consumeState(_subscribeMailboxInteractor.execute(accountId, subscribeRequest));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ class MailboxView extends GetWidget<MailboxController>
|
||||
iconPadding: EdgeInsets.zero,
|
||||
icon: SvgPicture.asset(
|
||||
_imagePaths.icSearchBar,
|
||||
color: AppColor.colorTextButton,
|
||||
colorFilter: AppColor.colorTextButton.asFilter(),
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
tooltip: AppLocalizations.of(context).searchForMailboxes,
|
||||
@@ -232,7 +232,10 @@ class MailboxView extends GetWidget<MailboxController>
|
||||
iconSize: 20,
|
||||
iconPadding: EdgeInsets.zero,
|
||||
splashRadius: 15,
|
||||
icon: SvgPicture.asset(_imagePaths.icAddNewFolder, color: AppColor.colorTextButton, fit: BoxFit.fill),
|
||||
icon: SvgPicture.asset(
|
||||
_imagePaths.icAddNewFolder,
|
||||
colorFilter: AppColor.colorTextButton.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
tooltip: AppLocalizations.of(context).new_mailbox,
|
||||
onTap: () => controller.goToCreateNewMailboxView(context)),
|
||||
],
|
||||
@@ -283,7 +286,8 @@ class MailboxView extends GetWidget<MailboxController>
|
||||
categories.getExpandMode(controller.mailboxCategoriesExpandMode.value) == ExpandMode.EXPAND
|
||||
? _imagePaths.icExpandFolder
|
||||
: _imagePaths.icCollapseFolder,
|
||||
color: AppColor.primaryColor, fit: BoxFit.fill),
|
||||
colorFilter: AppColor.primaryColor.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
tooltip: AppLocalizations.of(context).collapse,
|
||||
onTap: () => controller.toggleMailboxCategories(categories)),
|
||||
Expanded(child: Text(categories.getTitle(context),
|
||||
|
||||
@@ -151,7 +151,7 @@ class MailboxView extends GetWidget<MailboxController>
|
||||
iconPadding: EdgeInsets.zero,
|
||||
icon: SvgPicture.asset(
|
||||
_imagePaths.icSearchBar,
|
||||
color: AppColor.colorTextButton,
|
||||
colorFilter: AppColor.colorTextButton.asFilter(),
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
onTap: () => controller.openSearchViewAction(context)
|
||||
@@ -161,7 +161,10 @@ class MailboxView extends GetWidget<MailboxController>
|
||||
iconSize: 20,
|
||||
iconPadding: EdgeInsets.zero,
|
||||
splashRadius: 15,
|
||||
icon: SvgPicture.asset(_imagePaths.icAddNewFolder, color: AppColor.colorTextButton, fit: BoxFit.fill),
|
||||
icon: SvgPicture.asset(
|
||||
_imagePaths.icAddNewFolder,
|
||||
colorFilter: AppColor.colorTextButton.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
tooltip: AppLocalizations.of(context).new_mailbox,
|
||||
onTap: () => controller.goToCreateNewMailboxView(context)),
|
||||
],
|
||||
@@ -396,7 +399,7 @@ class MailboxView extends GetWidget<MailboxController>
|
||||
iconSize: 28,
|
||||
icon: SvgPicture.asset(
|
||||
_imagePaths.icAppDashboard,
|
||||
color: AppColor.primaryColor,
|
||||
colorFilter: AppColor.primaryColor.asFilter(),
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
tooltip: AppLocalizations.of(context).appGridTittle),
|
||||
@@ -423,7 +426,7 @@ class MailboxView extends GetWidget<MailboxController>
|
||||
controller.mailboxDashBoardController.appGridDashboardController.appDashboardExpandMode.value == ExpandMode.COLLAPSE
|
||||
? _imagePaths.icCollapseFolder
|
||||
: _imagePaths.icExpandFolder,
|
||||
color: AppColor.primaryColor,
|
||||
colorFilter: AppColor.primaryColor.asFilter(),
|
||||
fit: BoxFit.fill
|
||||
)),
|
||||
tooltip: AppLocalizations.of(context).appGridTittle,
|
||||
|
||||
@@ -145,7 +145,7 @@ mixin MailboxWidgetMixin {
|
||||
Key('${contextMenuItem.action.name}_action'),
|
||||
SvgPicture.asset(
|
||||
contextMenuItem.action.getContextMenuIcon(imagePaths),
|
||||
color: contextMenuItem.action.getColorContextMenuIcon(),
|
||||
colorFilter: contextMenuItem.action.getColorContextMenuIcon().asFilter(),
|
||||
width: 24,
|
||||
height: 24
|
||||
),
|
||||
@@ -298,7 +298,7 @@ mixin MailboxWidgetMixin {
|
||||
expandMode == ExpandMode.EXPAND
|
||||
? imagePaths.icExpandFolder
|
||||
: imagePaths.icCollapseFolder,
|
||||
color: AppColor.primaryColor,
|
||||
colorFilter: AppColor.primaryColor.asFilter(),
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
tooltip: expandMode == ExpandMode.EXPAND
|
||||
|
||||
@@ -53,8 +53,8 @@ class MailboxNode with EquatableMixin{
|
||||
}
|
||||
|
||||
List<MailboxNode>? updateNode(MailboxId mailboxId, MailboxNode newNode, {MailboxNode? parent}) {
|
||||
List<MailboxNode>? _children = parent == null ? childrenItems : parent.childrenItems;
|
||||
return _children?.map((MailboxNode child) {
|
||||
List<MailboxNode>? children = parent == null ? childrenItems : parent.childrenItems;
|
||||
return children?.map((MailboxNode child) {
|
||||
if (child.item.id == mailboxId) {
|
||||
return newNode;
|
||||
} else {
|
||||
@@ -91,8 +91,8 @@ class MailboxNode with EquatableMixin{
|
||||
}
|
||||
|
||||
List<MailboxNode>? toggleSelectNode(MailboxNode selectedMailboxMode, {MailboxNode? parent}) {
|
||||
List<MailboxNode>? _children = parent == null ? childrenItems : parent.childrenItems;
|
||||
return _children?.map((MailboxNode child) {
|
||||
List<MailboxNode>? children = parent == null ? childrenItems : parent.childrenItems;
|
||||
return children?.map((MailboxNode child) {
|
||||
if (child.item.id == selectedMailboxMode.item.id) {
|
||||
return child.toggleSelectMailboxNode();
|
||||
} else {
|
||||
@@ -105,8 +105,8 @@ class MailboxNode with EquatableMixin{
|
||||
}
|
||||
|
||||
List<MailboxNode>? toSelectedNode({required SelectMode selectMode, ExpandMode? newExpandMode, MailboxNode? parent}) {
|
||||
List<MailboxNode>? _children = parent == null ? childrenItems : parent.childrenItems;
|
||||
return _children?.map((MailboxNode child) {
|
||||
List<MailboxNode>? children = parent == null ? childrenItems : parent.childrenItems;
|
||||
return children?.map((MailboxNode child) {
|
||||
if (child.hasChildren()) {
|
||||
return child.copyWith(
|
||||
children: toSelectedNode(selectMode: selectMode, newExpandMode: newExpandMode, parent: child),
|
||||
|
||||
@@ -49,7 +49,12 @@ class MailboxNewFolderTileBuilder {
|
||||
leading: Padding(
|
||||
padding: const EdgeInsets.only(left: 34),
|
||||
child: _icon != null
|
||||
? SvgPicture.asset(_icon!, width: 24, height: 24, color: AppColor.mailboxIconColor, fit: BoxFit.fill)
|
||||
? SvgPicture.asset(
|
||||
_icon!,
|
||||
width: 24,
|
||||
height: 24,
|
||||
colorFilter: AppColor.mailboxIconColor.asFilter(),
|
||||
fit: BoxFit.fill)
|
||||
: const SizedBox.shrink()),
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(left: 8),
|
||||
|
||||
@@ -195,9 +195,9 @@ class MailBoxFolderTileBuilder {
|
||||
_mailboxNode.expandMode == ExpandMode.EXPAND
|
||||
? _imagePaths.icExpandFolder
|
||||
: _imagePaths.icCollapseFolder,
|
||||
color: _mailboxNode.item.allowedToDisplay
|
||||
? AppColor.primaryColor
|
||||
: AppColor.colorIconUnSubscribedMailbox,
|
||||
colorFilter: _mailboxNode.item.allowedToDisplay
|
||||
? AppColor.primaryColor.asFilter()
|
||||
: AppColor.colorIconUnSubscribedMailbox.asFilter(),
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
minSize: 12,
|
||||
|
||||
@@ -82,7 +82,10 @@ class UserInformationWidgetBuilder extends StatelessWidget {
|
||||
Transform(
|
||||
transform: Matrix4.translationValues(14.0, 0.0, 0.0),
|
||||
child: IconButton(
|
||||
icon: SvgPicture.asset(_imagePaths.icCollapseFolder, fit: BoxFit.fill, color: AppColor.colorCollapseMailbox),
|
||||
icon: SvgPicture.asset(
|
||||
_imagePaths.icCollapseFolder,
|
||||
fit: BoxFit.fill,
|
||||
colorFilter: AppColor.colorCollapseMailbox.asFilter()),
|
||||
onPressed: () => {}))
|
||||
]),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user