TF-3764 Update new empty view for folder
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M30.936 112.766C29.078 105.247 27.8148 97.5933 27.158 89.876C46.608 90.876 66.077 91.503 85.671 91.926C88.381 86.769 90.086 86.441 93.264 86.454L123.868 86.566C126.486 86.566 129.34 86.666 131.346 88.344C133.136 89.838 133.821 92.244 134.627 94.482C134.586 94.482 134.549 94.482 134.524 94.572C136.452 94.482 138.385 94.572 140.296 94.844C142.98 95.229 142.899 96.719 141.502 101.566C137.18 116.566 135.127 131.535 131.121 146.635C131.09 146.635 129.871 146.347 129.315 146.635C121.055 140.013 109.483 137.403 99.736 133.266C82.958 126.144 83.799 123.982 55.277 116.241C47.233 114.063 38.966 111.875 30.936 112.766Z" fill="#AACCFF"/>
|
||||
<path d="M152.518 27.475C152.518 24.256 153.865 22.006 148.199 21.322C137.871 20.0815 127.428 20.1403 117.115 21.497C114.134 21.891 112.646 22.647 111.996 27.272C111.139 33.391 110.915 39.582 111.327 45.747C111.618 50.097 113.043 52.122 119.484 51.607L148.405 49.287C151.102 49.072 152.824 48.291 152.78 43.169C152.721 37.947 152.671 32.729 152.518 27.475Z" fill="#FFE09D"/>
|
||||
<path d="M135.674 59.4782C124.655 60.0482 124.895 59.9282 124.361 60.3222C123.914 60.6502 123.767 61.2442 123.652 61.7882C122.488 67.4008 121.923 73.1212 121.967 78.8532C121.967 80.7502 122.492 81.5192 124.864 81.6382C130.729 81.9312 136.608 81.7732 142.449 81.1662C144.011 81.0032 144.52 80.6102 144.764 78.8062C145.461 73.6079 145.827 68.3708 145.861 63.1262C145.861 62.1882 145.82 61.1162 145.152 60.4382C143.808 59.0632 137.577 59.3752 135.674 59.4782ZM80.7269 88.4092C81.5649 85.0252 82.5519 83.8342 87.0299 83.8192C94.7474 83.7898 102.463 84.0878 110.155 84.7122C114.052 85.0252 114.724 86.7002 113.33 89.9152C109.912 97.8098 107.32 106.037 105.596 114.465C105.205 116.368 104.58 116.678 103.036 116.5C99.2859 116.071 75.2239 114.259 74.8679 113.687C74.6549 113.334 74.4199 113.915 80.7269 88.4092Z" fill="#E0EDFF"/>
|
||||
<path d="M128.565 70.3101H125.752C125.649 70.3099 125.548 70.33 125.453 70.3691C125.358 70.4083 125.272 70.4657 125.2 70.5382C125.127 70.6106 125.07 70.6966 125.03 70.7913C124.991 70.886 124.971 70.9875 124.971 71.0901V76.4811C124.971 76.9131 125.321 77.2631 125.752 77.2631H128.565C128.996 77.2631 129.346 76.9131 129.346 76.4811V71.0911C129.346 70.9885 129.326 70.8868 129.287 70.792C129.248 70.6972 129.19 70.6111 129.117 70.5385C129.045 70.466 128.959 70.4084 128.864 70.3692C128.769 70.33 128.668 70.3099 128.565 70.3101Z" fill="white"/>
|
||||
<path d="M134.719 66.5649H131.906C131.803 66.5648 131.702 66.585 131.607 66.6242C131.512 66.6635 131.426 66.7211 131.353 66.7937C131.281 66.8664 131.223 66.9527 131.184 67.0476C131.145 67.1425 131.125 67.2443 131.125 67.3469V76.4809C131.125 76.9119 131.475 77.2619 131.906 77.2619H134.719C135.15 77.2619 135.5 76.9119 135.5 76.4819V67.3469C135.5 67.2443 135.48 67.1425 135.441 67.0476C135.402 66.9527 135.344 66.8664 135.272 66.7937C135.199 66.7211 135.113 66.6635 135.018 66.6242C134.923 66.585 134.822 66.5648 134.719 66.5649Z" fill="#AACCFF"/>
|
||||
<path d="M142.072 63.8901H139.26C139.157 63.89 139.056 63.9101 138.961 63.9494C138.866 63.9887 138.78 64.0463 138.707 64.119C138.635 64.1916 138.577 64.2779 138.538 64.3728C138.499 64.4677 138.479 64.5695 138.479 64.6721V76.4821C138.479 76.5847 138.499 76.6862 138.538 76.7809C138.578 76.8756 138.635 76.9616 138.708 77.034C138.78 77.1065 138.866 77.1639 138.961 77.203C139.056 77.2422 139.157 77.2623 139.26 77.2621H142.072C142.504 77.2621 142.854 76.9121 142.854 76.4821V64.6721C142.854 64.5695 142.834 64.4678 142.795 64.3729C142.755 64.278 142.698 64.1918 142.625 64.1192C142.553 64.0467 142.466 63.9892 142.371 63.95C142.276 63.9109 142.175 63.8899 142.072 63.8901Z" fill="#FFE09D"/>
|
||||
<path d="M115.907 41.0101C116.775 38.4281 118.069 36.5031 119.753 35.2971C121.9 33.7571 124.778 33.5501 126.75 34.7971C127.972 35.5691 128.71 36.7191 129.647 37.5781C130.397 38.2681 131.507 38.7811 132.297 38.3811C133.547 37.7561 135.678 33.1501 138.766 30.7151C143.475 27.0001 148.96 29.8031 147.682 31.2651C147.545 31.4205 147.353 31.5166 147.146 31.5331C147.043 31.54 146.94 31.5265 146.843 31.4934C146.745 31.4603 146.655 31.4082 146.578 31.3401C144.703 29.7061 141.653 30.4281 139.735 31.9401C136.71 34.3281 134.878 38.8151 133.003 39.7781C131.441 40.5661 129.703 39.7531 128.591 38.7311C127.625 37.8441 126.888 36.7311 125.916 36.1191C124.466 35.2031 122.31 35.3871 120.666 36.5661C119.25 37.5781 118.15 39.2401 117.388 41.5061C117.06 42.5001 115.578 41.9911 115.907 41.0101Z" fill="white"/>
|
||||
<path d="M131.949 40.8779C132.587 40.8779 133.199 40.6244 133.65 40.1732C134.101 39.722 134.355 39.11 134.355 38.4719C134.355 37.8338 134.101 37.2218 133.65 36.7706C133.199 36.3194 132.587 36.0659 131.949 36.0659C131.311 36.0659 130.699 36.3194 130.248 36.7706C129.796 37.2218 129.543 37.8338 129.543 38.4719C129.543 39.11 129.796 39.722 130.248 40.1732C130.699 40.6244 131.311 40.8779 131.949 40.8779ZM122.564 37.1299C122.884 37.1365 123.202 37.079 123.5 36.961C123.798 36.843 124.069 36.6668 124.298 36.4427C124.526 36.2186 124.708 35.9511 124.832 35.6559C124.956 35.3607 125.02 35.0437 125.02 34.7234C125.02 34.4032 124.956 34.0862 124.832 33.791C124.708 33.4958 124.526 33.2283 124.298 33.0042C124.069 32.7801 123.798 32.6038 123.5 32.4858C123.202 32.3678 122.884 32.3104 122.564 32.3169C121.926 32.3169 121.313 32.5705 120.862 33.0219C120.411 33.4733 120.157 34.0856 120.157 34.7239C120.157 35.3623 120.411 35.9745 120.862 36.4259C121.313 36.8773 121.926 37.1299 122.564 37.1299ZM142.854 32.0439C143.492 32.0439 144.104 31.7904 144.555 31.3392C145.006 30.888 145.26 30.276 145.26 29.6379C145.26 28.9998 145.006 28.3878 144.555 27.9366C144.104 27.4854 143.492 27.2319 142.854 27.2319C142.216 27.2319 141.604 27.4854 141.153 27.9366C140.701 28.3878 140.448 28.9998 140.448 29.6379C140.448 30.276 140.701 30.888 141.153 31.3392C141.604 31.7904 142.216 32.0439 142.854 32.0439Z" fill="white"/>
|
||||
<path d="M103.438 37.4409C101.913 50.1452 99.2145 62.6811 95.3779 74.8879C82.3849 76.8499 68.5039 78.7939 54.9319 76.6219C57.0289 70.2619 56.8439 68.0909 60.6539 19.0159C73.6409 18.3909 86.3499 17.9259 99.0599 17.8379C99.0789 17.8599 99.1069 17.8819 99.1289 17.9039C104.541 22.8129 104.26 30.4629 103.438 37.4409Z" fill="#E0EDFF"/>
|
||||
<path d="M103.818 28.6898C102.79 27.2421 101.398 26.0914 99.7821 25.354C98.1668 24.6165 96.3854 24.3184 94.6179 24.4898C96.3721 22.4803 97.8807 20.2691 99.1119 17.9028C102.059 20.5658 103.553 24.6868 103.818 28.6898ZM71.8899 22.0348C71.7559 22.8848 71.5089 25.6168 72.1619 26.1818C72.4479 26.3748 72.7909 26.4638 73.1339 26.4348C80.0089 26.6318 91.5279 26.7728 91.8839 26.4848C92.0511 26.3108 92.1449 26.0791 92.1459 25.8378C92.3006 24.6032 92.4183 23.3658 92.4989 22.1258C85.6386 21.6474 78.7542 21.6163 71.8899 22.0348ZM96.3439 31.3498C86.8239 30.6998 77.2759 30.5188 67.7379 30.8098C67.655 30.812 67.5746 30.7812 67.5142 30.7243C67.4539 30.6673 67.4186 30.5888 67.4159 30.5058C67.4135 30.423 67.4441 30.3425 67.5009 30.2822C67.5577 30.2218 67.6361 30.1864 67.7189 30.1838C77.2783 29.891 86.8464 30.0712 96.3879 30.7238C96.471 30.7297 96.5483 30.7682 96.6028 30.8311C96.6574 30.8939 96.6848 30.9758 96.6789 31.0588C96.6731 31.1418 96.6345 31.2191 96.5717 31.2737C96.5089 31.3283 96.427 31.3557 96.3439 31.3498ZM91.9469 36.8438C82.5279 36.8438 72.9069 34.5808 63.6129 35.8308C63.5329 35.8362 63.4539 35.811 63.3917 35.7603C63.3296 35.7096 63.2891 35.6371 63.2784 35.5576C63.2678 35.4782 63.2877 35.3976 63.3342 35.3323C63.3807 35.2669 63.4503 35.2217 63.5289 35.2058C74.5089 33.7498 85.6249 37.0588 96.5629 36.0118C96.6044 36.007 96.6465 36.0105 96.6866 36.0221C96.7267 36.0337 96.7641 36.0533 96.7966 36.0795C96.8291 36.1058 96.856 36.1382 96.8758 36.175C96.8955 36.2118 96.9078 36.2521 96.9118 36.2937C96.9158 36.3353 96.9114 36.3773 96.899 36.4171C96.8866 36.457 96.8663 36.494 96.8394 36.526C96.8125 36.5579 96.7795 36.5842 96.7424 36.6032C96.7052 36.6222 96.6646 36.6337 96.6229 36.6368C95.0683 36.7774 93.508 36.8464 91.9469 36.8438ZM71.3319 40.6898C63.2969 40.2308 62.7619 40.6248 62.7879 40.0278C62.8139 39.4308 63.3479 39.8678 71.3569 40.0648C71.3991 40.0648 71.4408 40.0733 71.4796 40.0899C71.5184 40.1064 71.5534 40.1306 71.5826 40.161C71.6119 40.1914 71.6346 40.2274 71.6496 40.2668C71.6645 40.3062 71.6714 40.3482 71.6697 40.3903C71.668 40.4325 71.6578 40.4738 71.6398 40.5119C71.6217 40.55 71.5961 40.5841 71.5646 40.612C71.5331 40.64 71.4962 40.6613 71.4562 40.6747C71.4162 40.688 71.374 40.6932 71.3319 40.6898ZM104.472 101.134C103.982 104.606 100.519 108.634 97.9319 110.175C93.6069 112.737 87.3849 111.225 84.6219 107.025C81.8589 102.825 82.8349 96.6248 86.6819 93.3848C90.5279 90.1428 96.6819 90.1588 100.6 93.3308C102.982 95.2588 104.907 98.0968 104.472 101.134Z" fill="#AACCFF"/>
|
||||
<path d="M104.471 101.134C104.159 103.321 102.909 105.281 101.496 106.975C99.506 109.346 97.434 110.978 94.378 111.35C94.171 104.609 93.334 97.5681 95.068 91.0371C100.956 91.7621 105.056 97.0311 104.471 101.134Z" fill="white"/>
|
||||
<path d="M101.496 106.975C98.6579 110.356 95.4299 112.219 90.8149 111.163C95.6049 98.5501 91.9299 103.76 104.518 99.8101C104.686 102.472 103.208 104.928 101.496 106.975Z" fill="#FFE09D"/>
|
||||
<path d="M17.2749 102C37.8954 100.749 58.5702 100.668 79.1999 101.756C83.8879 104.543 88.5569 107.334 93.1909 110.381C101.863 110.381 110.532 110.381 118.944 110.593C122.441 125.037 125.475 130.906 126.375 134.509C127.247 138.003 127 141.718 131.122 146.634C98.0048 145.728 64.8718 145.55 31.7469 146.1C27.3099 136.25 22.7469 127.715 20.0659 117.187C18.8939 112.609 18.1899 107.862 17.2749 102Z" fill="#E0EDFF"/>
|
||||
<path d="M38.623 33.7042C25.02 37.0282 7.48202 43.1952 5.60302 44.8372C4.69502 45.6322 4.23802 46.8362 4.04302 48.0272C3.38002 52.1682 4.85002 54.8122 11.982 72.7222C13.188 75.7542 14.374 76.3872 17.607 75.2922C27.6609 71.8963 37.6399 68.2828 47.537 64.4542C50.507 63.3042 51.008 62.1342 49.994 59.1812C41.711 35.0912 42.078 35.5842 41.03 34.4712C40.726 34.1509 40.3459 33.9126 39.9251 33.7785C39.5042 33.6444 39.0564 33.6188 38.623 33.7042Z" fill="#FFE09D"/>
|
||||
<path d="M32.552 41.2631C34.0961 39.8156 36.0568 38.8909 38.156 38.6201C38.781 38.5431 38.918 38.7671 38.956 39.1241C39.221 40.7871 39.389 42.4641 39.461 44.1461C39.514 44.5061 39.443 44.8731 39.261 45.1881C39.1237 45.3414 38.9466 45.4535 38.7494 45.5119C38.5521 45.5704 38.3425 45.5729 38.144 45.5191C37.727 45.4281 37.477 45.2471 36.266 44.4951C34.536 48.5981 32.837 52.8171 30.679 56.8251C30.4796 57.1999 30.1435 57.4835 29.7405 57.6168C29.3374 57.7502 28.8985 57.7231 28.515 57.5411C26.7638 56.6964 24.9666 55.9506 23.132 55.3071C22.7271 55.1206 22.2727 55.0704 21.837 55.1641C21.152 55.3911 21.341 55.4001 14.63 65.7041C14.019 66.6471 12.5 66.1821 12.593 65.0631C12.659 64.2721 13.085 63.5451 13.483 62.8701C18.873 53.8231 19.356 52.3401 21.088 52.3481C21.69 52.3511 21.818 52.4681 27.709 54.8521C28.142 55.0171 28.647 55.1781 29.011 54.9161C29.445 54.5991 33.503 44.9261 34.304 43.3461C32.644 42.4401 31.502 42.2401 32.552 41.2631Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -256,6 +256,7 @@ extension AppColor on Color {
|
||||
static const textPrimary = Color(0xFF424244);
|
||||
static const iconFolder = Color(0xFF297EF2);
|
||||
static const folderDivider = Color(0xFFE4E8EC);
|
||||
static const color424244 = Color(0xFF424244);
|
||||
|
||||
static const mapGradientColor = [
|
||||
[Color(0xFF21D4FD), Color(0xFFB721FF)],
|
||||
|
||||
@@ -12,7 +12,7 @@ class ImagePaths {
|
||||
String get icDownload => _getImagePath('ic_download.svg');
|
||||
String get icMore => _getImagePath('ic_more.svg');
|
||||
String get icPhotoLibrary => _getImagePath('ic_photo_library.svg');
|
||||
String get icEmptyEmail => _getImagePath('ic_empty_email.svg');
|
||||
String get icEmptyFolder => _getImagePath('ic_empty_folder.svg');
|
||||
String get icStar => _getImagePath('ic_star.svg');
|
||||
String get icUnStar => _getImagePath('ic_unstar.svg');
|
||||
String get icAttachment => _getImagePath('ic_attachment.svg');
|
||||
|
||||
@@ -270,6 +270,24 @@ class ThemeUtils {
|
||||
color: AppColor.steelGray400,
|
||||
);
|
||||
|
||||
static TextStyle textStyleInter600() => TextStyle(
|
||||
fontFamily: ConstantsUI.fontApp,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0.0,
|
||||
fontSize: 24,
|
||||
height: 28.01 / 24,
|
||||
color: AppColor.color424244.withOpacity(0.9),
|
||||
);
|
||||
|
||||
static TextStyle textStyleInter400() => TextStyle(
|
||||
fontFamily: ConstantsUI.fontApp,
|
||||
fontWeight: FontWeight.w400,
|
||||
letterSpacing: -0.15,
|
||||
fontSize: 16,
|
||||
height: 21.01 / 16,
|
||||
color: AppColor.color424244.withOpacity(0.64),
|
||||
);
|
||||
|
||||
static TextSelectionThemeData get _textSelectionTheme {
|
||||
return const TextSelectionThemeData(
|
||||
cursorColor: AppColor.primaryColor,
|
||||
|
||||
@@ -1,30 +1,10 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class EmptyEmailsWidgetStyles {
|
||||
static const double mobileIconSize = 160;
|
||||
static const double tabletIconSize = 180;
|
||||
static const double desktopIconSize = 212;
|
||||
static const double labelTextSize = 20;
|
||||
static const double messageTextSize = 15;
|
||||
static const double createFilterLabelTextSize = 22;
|
||||
static const double createFilterButtonTextSize = 17;
|
||||
static const double maxWidth = 490;
|
||||
static const double createFilterButtonBorderRadius = 10;
|
||||
|
||||
static const FontWeight labelFontWeight = FontWeight.w400;
|
||||
static const FontWeight messageFontWeight = FontWeight.w400;
|
||||
static const FontWeight createFilterLabelFontWeight = FontWeight.w600;
|
||||
static const FontWeight createFilterButtonFontWeight = FontWeight.w500;
|
||||
|
||||
static const Color labelTextColor = Colors.black;
|
||||
static const Color messageTextColor = AppColor.colorSubtitle;
|
||||
static const Color createFilterButtonTextColor = AppColor.primaryColor;
|
||||
static const Color createFilterButtonBackgroundColor = AppColor.colorCreateFiltersButton;
|
||||
static const double iconSize = 160;
|
||||
static const double maxWidth = 352.07;
|
||||
|
||||
static const EdgeInsetsGeometry padding = EdgeInsetsDirectional.all(16);
|
||||
static const EdgeInsetsGeometry labelPadding = EdgeInsetsDirectional.symmetric(vertical: 12);
|
||||
static const EdgeInsetsGeometry createFilterButtonPadding = EdgeInsetsDirectional.symmetric(vertical: 12, horizontal: 24);
|
||||
static const EdgeInsetsGeometry createFilterButtonMargin = EdgeInsetsDirectional.only(top: 12);
|
||||
static const EdgeInsetsGeometry labelPadding = EdgeInsetsDirectional.only(top: 16, bottom: 8);
|
||||
}
|
||||
@@ -737,7 +737,6 @@ class ThreadView extends GetWidget<ThreadController>
|
||||
isNetworkConnectionAvailable: controller.networkConnectionController.isNetworkConnectionAvailable(),
|
||||
isSearchActive: controller.isSearchActive,
|
||||
isFilterMessageActive: controller.mailboxDashBoardController.filterMessageOption.value != FilterMessageOption.all,
|
||||
onCreateFiltersActionCallback: controller.goToCreateEmailRuleView
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/thread/presentation/styles/empty_emails_widget_styles.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
typedef OnCreateFiltersActionCallback = Function();
|
||||
|
||||
class EmptyEmailsWidget extends StatelessWidget {
|
||||
|
||||
final bool isSearchActive;
|
||||
final bool isFilterMessageActive;
|
||||
final bool isNetworkConnectionAvailable;
|
||||
final OnCreateFiltersActionCallback? onCreateFiltersActionCallback;
|
||||
|
||||
final _responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
final _imagePaths = Get.find<ImagePaths>();
|
||||
@@ -24,7 +21,6 @@ class EmptyEmailsWidget extends StatelessWidget {
|
||||
this.isSearchActive = false,
|
||||
this.isFilterMessageActive = false,
|
||||
this.isNetworkConnectionAvailable = true,
|
||||
this.onCreateFiltersActionCallback,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -37,9 +33,9 @@ class EmptyEmailsWidget extends StatelessWidget {
|
||||
: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
_imagePaths.icEmptyEmail,
|
||||
width: _getIconSize(context, _responsiveUtils),
|
||||
height: _getIconSize(context, _responsiveUtils),
|
||||
_imagePaths.icEmptyFolder,
|
||||
width: EmptyEmailsWidgetStyles.iconSize,
|
||||
height: EmptyEmailsWidgetStyles.iconSize,
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
Padding(
|
||||
@@ -47,31 +43,17 @@ class EmptyEmailsWidget extends StatelessWidget {
|
||||
child: Text(
|
||||
key: const Key('empty_email_message'),
|
||||
_getMessageEmptyEmail(context),
|
||||
style: const TextStyle(
|
||||
color: EmptyEmailsWidgetStyles.labelTextColor,
|
||||
fontSize: EmptyEmailsWidgetStyles.createFilterLabelTextSize,
|
||||
fontWeight: EmptyEmailsWidgetStyles.createFilterLabelFontWeight
|
||||
),
|
||||
style: ThemeUtils.textStyleInter600(),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
if (_validateShowCreateRuleButton)
|
||||
TMailButtonWidget.fromText(
|
||||
key: const Key('create_filter_rule_button_within_empty_email'),
|
||||
text: AppLocalizations.of(context).createFilters,
|
||||
padding: EmptyEmailsWidgetStyles.createFilterButtonPadding,
|
||||
margin: EmptyEmailsWidgetStyles.createFilterButtonMargin,
|
||||
backgroundColor: EmptyEmailsWidgetStyles.createFilterButtonBackgroundColor,
|
||||
borderRadius: EmptyEmailsWidgetStyles.createFilterButtonBorderRadius,
|
||||
width: _responsiveUtils.isPortraitMobile(context) ? double.infinity : null,
|
||||
if (_showEmailSubMessage)
|
||||
Text(
|
||||
key: const Key('empty_email_sub_message'),
|
||||
AppLocalizations.of(context).startToComposeEmails,
|
||||
style: ThemeUtils.textStyleInter400(),
|
||||
textAlign: TextAlign.center,
|
||||
textStyle: const TextStyle(
|
||||
fontSize: EmptyEmailsWidgetStyles.createFilterButtonTextSize,
|
||||
fontWeight: EmptyEmailsWidgetStyles.createFilterButtonFontWeight,
|
||||
color: EmptyEmailsWidgetStyles.createFilterButtonTextColor
|
||||
),
|
||||
onTapActionCallback: onCreateFiltersActionCallback,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -88,18 +70,9 @@ class EmptyEmailsWidget extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
double _getIconSize(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (responsiveUtils.isMobile(context)) {
|
||||
return EmptyEmailsWidgetStyles.mobileIconSize;
|
||||
} else if (responsiveUtils.isDesktop(context)) {
|
||||
return EmptyEmailsWidgetStyles.desktopIconSize;
|
||||
} else {
|
||||
return EmptyEmailsWidgetStyles.tabletIconSize;
|
||||
}
|
||||
}
|
||||
|
||||
bool get _validateShowCreateRuleButton => isNetworkConnectionAvailable
|
||||
&& !isFilterMessageActive && !isSearchActive && onCreateFiltersActionCallback != null;
|
||||
bool get _showEmailSubMessage => isNetworkConnectionAvailable &&
|
||||
!isFilterMessageActive &&
|
||||
!isSearchActive;
|
||||
|
||||
String _getMessageEmptyEmail(BuildContext context) {
|
||||
if (!isNetworkConnectionAvailable) {
|
||||
@@ -108,12 +81,10 @@ class EmptyEmailsWidget extends StatelessWidget {
|
||||
|
||||
if (isSearchActive) {
|
||||
return AppLocalizations.of(context).no_emails_matching_your_search;
|
||||
} else {
|
||||
if (isFilterMessageActive) {
|
||||
} else if (isFilterMessageActive) {
|
||||
return AppLocalizations.of(context).noEmailMatchYourCurrentFilter;
|
||||
} else {
|
||||
return AppLocalizations.of(context).noEmailInYourCurrentFolder;
|
||||
}
|
||||
return AppLocalizations.of(context).youDoNotHaveAnyEmailInYourCurrentFolder;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"@@last_modified": "2025-05-27T01:35:50.697124",
|
||||
"@@last_modified": "2025-06-02T16:27:17.653715",
|
||||
"initializing_data": "Initializing data...",
|
||||
"@initializing_data": {
|
||||
"type": "text",
|
||||
@@ -4527,5 +4527,17 @@
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"youDoNotHaveAnyEmailInYourCurrentFolder": "You don’t have any emails in this folder.",
|
||||
"@youDoNotHaveAnyEmailInYourCurrentFolder": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"startToComposeEmails": "Start to compose emails.",
|
||||
"@startToComposeEmails": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
}
|
||||
}
|
||||
@@ -4766,4 +4766,18 @@ class AppLocalizations {
|
||||
name: 'deleteRecipientsFailed',
|
||||
);
|
||||
}
|
||||
|
||||
String get youDoNotHaveAnyEmailInYourCurrentFolder {
|
||||
return Intl.message(
|
||||
'You don’t have any emails\n in this folder.',
|
||||
name: 'youDoNotHaveAnyEmailInYourCurrentFolder',
|
||||
);
|
||||
}
|
||||
|
||||
String get startToComposeEmails {
|
||||
return Intl.message(
|
||||
'Start to compose emails.',
|
||||
name: 'startToComposeEmails',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ void main() {
|
||||
child: EmptyEmailsWidget(
|
||||
isSearchActive: false,
|
||||
isFilterMessageActive: false,
|
||||
onCreateFiltersActionCallback: () {},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -51,14 +50,14 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.byKey(const Key('create_filter_rule_button_within_empty_email')),
|
||||
find.byKey(const Key('empty_email_sub_message')),
|
||||
findsOneWidget);
|
||||
|
||||
final emptyEmailMessageWidgetFinder = find.byKey(const Key('empty_email_message'));
|
||||
final emptyEmailMessageWidget = tester.widget<Text>(emptyEmailMessageWidgetFinder);
|
||||
expect(
|
||||
emptyEmailMessageWidget.data,
|
||||
'We\'re sorry, there are no emails in your current folder');
|
||||
'You don’t have any emails\n in this folder.');
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
@@ -77,7 +76,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.byKey(const Key('create_filter_rule_button_within_empty_email')),
|
||||
find.byKey(const Key('empty_email_sub_message')),
|
||||
findsNothing);
|
||||
|
||||
final emptyEmailMessageWidgetFinder = find.byKey(const Key('empty_email_message'));
|
||||
@@ -102,7 +101,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.byKey(const Key('create_filter_rule_button_within_empty_email')),
|
||||
find.byKey(const Key('empty_email_sub_message')),
|
||||
findsNothing);
|
||||
|
||||
final emptyEmailMessageWidgetFinder = find.byKey(const Key('empty_email_message'));
|
||||
@@ -126,7 +125,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.byKey(const Key('create_filter_rule_button_within_empty_email')),
|
||||
find.byKey(const Key('empty_email_sub_message')),
|
||||
findsNothing);
|
||||
|
||||
final emptyEmailMessageWidgetFinder = find.byKey(const Key('empty_email_message'));
|
||||
@@ -151,7 +150,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.byKey(const Key('create_filter_rule_button_within_empty_email')),
|
||||
find.byKey(const Key('empty_email_sub_message')),
|
||||
findsNothing);
|
||||
|
||||
final emptyEmailMessageWidgetFinder = find.byKey(const Key('empty_email_message'));
|
||||
@@ -176,7 +175,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.byKey(const Key('create_filter_rule_button_within_empty_email')),
|
||||
find.byKey(const Key('empty_email_sub_message')),
|
||||
findsNothing);
|
||||
|
||||
final emptyEmailMessageWidgetFinder = find.byKey(const Key('empty_email_message'));
|
||||
@@ -200,10 +199,6 @@ void main() {
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.byKey(const Key('create_filter_rule_button_within_empty_email')),
|
||||
findsNothing);
|
||||
|
||||
final emptyEmailMessageWidgetFinder = find.byKey(const Key('empty_email_message'));
|
||||
final emptyEmailMessageWidget = tester.widget<Text>(emptyEmailMessageWidgetFinder);
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user