TF-528 Update size for responsive on tablet and landscape mobile

This commit is contained in:
dab246
2022-05-04 10:52:57 +07:00
committed by Dat H. Pham
parent 2e3c4e8f88
commit dbbc13eab4
20 changed files with 316 additions and 418 deletions
@@ -510,7 +510,7 @@ class EmailController extends BaseController {
}
void openEmailAddressDialog(BuildContext context, EmailAddress emailAddress) {
if (responsiveUtils.isMobile(context) || responsiveUtils.isMobileDevice(context)) {
if (responsiveUtils.isScreenWithShortestSide(context)) {
(EmailAddressBottomSheetBuilder(context, imagePaths, emailAddress)
..addOnCloseContextMenuAction(() => popBack())
..addOnCopyEmailAddressAction((emailAddress) => copyEmailAddress(context, emailAddress))
@@ -362,7 +362,7 @@ class EmailView extends GetView with NetworkConnectionMixin {
}
int _getAttachmentLimitDisplayed(BuildContext context) {
if (responsiveUtils.isMobileDevice(context)) {
if (responsiveUtils.isScreenWithShortestSide(context)) {
return 2;
} else if (responsiveUtils.isTablet(context)) {
return 3;
@@ -84,7 +84,7 @@ class _AttachmentsPlaceHolderLoadingState extends State<AttachmentsPlaceHolderLo
Widget _placeHolderAttachment(BuildContext context) {
double width = MediaQuery.of(context).size.width;
final percentAttachment = widget.responsiveUtils.isMobileDevice(context)
final percentAttachment = widget.responsiveUtils.isScreenWithShortestSide(context)
? 0.4
: widget.responsiveUtils.isTablet(context) ? 0.22 : 0.14;
return Container(