TF-1915 Sync set padding for multiple platform

(cherry picked from commit 2dca49df4242119b7debbaf4d6fd12697d6955c9)
This commit is contained in:
dab246
2023-06-08 15:19:13 +07:00
committed by Dat Vu
parent 8194d34b4c
commit e6e028f380
6 changed files with 160 additions and 109 deletions
@@ -0,0 +1,39 @@
import 'package:core/core.dart';
import 'package:flutter/cupertino.dart';
import 'package:tmail_ui_user/features/composer/domain/model/sending_email.dart';
class SendingQueueUtils {
static EdgeInsets getPaddingAppBarByResponsiveSize(double width) {
if (ResponsiveUtils.isMatchedMobileWidth(width)) {
return const EdgeInsets.symmetric(horizontal: 10);
} else {
return const EdgeInsets.symmetric(horizontal: 24);
}
}
static EdgeInsets getMarginBannerMessageByResponsiveSize(double width) {
if (ResponsiveUtils.isMatchedMobileWidth(width)) {
return const EdgeInsets.only(top: 16, left: 16, right: 16);
} else {
return const EdgeInsets.symmetric(horizontal: 24, vertical: 16);
}
}
static EdgeInsets getPaddingItemListViewByResponsiveSize(double width) {
if (ResponsiveUtils.isMatchedMobileWidth(width)) {
return const EdgeInsets.symmetric(horizontal: 16, vertical: 8);
} else {
return const EdgeInsets.symmetric(horizontal: 32, vertical: 8);
}
}
static EdgeInsets getPaddingDividerListViewByResponsiveSize(double width, SendingEmail sendingEmail) {
if (ResponsiveUtils.isMatchedMobileWidth(width)) {
return EdgeInsets.only(left: 84, right: 8, top: sendingEmail.isReady ? 0 : 8);
} else {
return EdgeInsets.only(left: 100, right: 24, top: sendingEmail.isReady ? 0 : 8);
}
}
}