Fix padding item email in Thread and Search
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit 377085ba9054c6eb4c8e3d8388821473b3335962)
This commit is contained in:
+8
-1
@@ -1,5 +1,6 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/filter_message_option.dart';
|
||||
|
||||
@@ -10,7 +11,13 @@ class DefaultWebAppBarThreadWidgetStyle {
|
||||
|
||||
static const Color backgroundColor = Colors.white;
|
||||
|
||||
static const EdgeInsetsGeometry padding = EdgeInsets.symmetric(vertical: 8, horizontal: 16);
|
||||
static EdgeInsetsGeometry getPadding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (responsiveUtils.isMobile(context) || responsiveUtils.isTabletLarge(context)) {
|
||||
return const EdgeInsets.symmetric(horizontal: 16, vertical: 8);
|
||||
} else {
|
||||
return const EdgeInsets.symmetric(horizontal: 32, vertical: 8);
|
||||
}
|
||||
}
|
||||
static const EdgeInsetsGeometry mailboxMenuPadding = EdgeInsets.all(5);
|
||||
static const EdgeInsetsGeometry titlePadding = EdgeInsets.symmetric(horizontal: 16);
|
||||
|
||||
|
||||
+8
-1
@@ -1,5 +1,6 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/filter_message_option.dart';
|
||||
|
||||
@@ -11,7 +12,13 @@ class MobileAppBarThreadWidgetStyle {
|
||||
static const Color backgroundColor = Colors.white;
|
||||
static const Color backButtonColor = AppColor.primaryColor;
|
||||
|
||||
static const EdgeInsetsGeometry padding = EdgeInsets.symmetric(vertical: 8, horizontal: 16);
|
||||
static EdgeInsetsGeometry getPadding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (responsiveUtils.isPortraitMobile(context) || responsiveUtils.isLandscapeTablet(context)) {
|
||||
return const EdgeInsets.symmetric(horizontal: 16, vertical: 8);
|
||||
} else {
|
||||
return const EdgeInsets.symmetric(horizontal: 32, vertical: 8);
|
||||
}
|
||||
}
|
||||
|
||||
static const TextStyle editButtonStyle = TextStyle(
|
||||
fontSize: 17,
|
||||
|
||||
+8
-1
@@ -1,5 +1,6 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SelectionWebAppBarThreadWidgetStyle {
|
||||
@@ -11,7 +12,13 @@ class SelectionWebAppBarThreadWidgetStyle {
|
||||
static const Color backgroundColor = Colors.white;
|
||||
static const Color cancelButtonColor = AppColor.primaryColor;
|
||||
|
||||
static const EdgeInsetsGeometry padding = EdgeInsets.symmetric(vertical: 8, horizontal: 16);
|
||||
static EdgeInsetsGeometry getPadding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (responsiveUtils.isMobile(context) || responsiveUtils.isTabletLarge(context)) {
|
||||
return const EdgeInsets.symmetric(horizontal: 16, vertical: 8);
|
||||
} else {
|
||||
return const EdgeInsets.symmetric(horizontal: 32, vertical: 8);
|
||||
}
|
||||
}
|
||||
static const EdgeInsetsGeometry closeButtonPadding = EdgeInsets.all(3);
|
||||
|
||||
static const TextStyle emailCounterStyle = TextStyle(
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class ItemEmailTileStyles {
|
||||
|
||||
static const double avatarIconSize = 60.0;
|
||||
static const double horizontalTitleGap = 8.0;
|
||||
|
||||
static EdgeInsetsGeometry getSpaceCalendarEventIcon(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (responsiveUtils.isScreenWithShortestSide(context)) {
|
||||
return const EdgeInsetsDirectional.only(end: 4);
|
||||
@@ -13,4 +17,32 @@ class ItemEmailTileStyles {
|
||||
return const EdgeInsetsDirectional.only(end: 8);
|
||||
}
|
||||
}
|
||||
|
||||
static EdgeInsetsGeometry getPaddingItemList(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (PlatformInfo.isWeb) {
|
||||
if (responsiveUtils.isDesktop(context)) {
|
||||
return const EdgeInsetsDirectional.only(start: 120);
|
||||
} else if (responsiveUtils.isMobile(context) || responsiveUtils.isTabletLarge(context)) {
|
||||
return const EdgeInsets.symmetric(horizontal: 16);
|
||||
} else {
|
||||
return const EdgeInsets.symmetric(horizontal: 32);
|
||||
}
|
||||
} else {
|
||||
if (responsiveUtils.isPortraitMobile(context) || responsiveUtils.isLandscapeTablet(context)) {
|
||||
return const EdgeInsets.symmetric(horizontal: 16);
|
||||
} else {
|
||||
return const EdgeInsets.symmetric(horizontal: 32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static EdgeInsetsGeometry getPaddingDividerWeb(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (responsiveUtils.isDesktop(context)) {
|
||||
return const EdgeInsetsDirectional.only(start: 120);
|
||||
} else if (responsiveUtils.isMobile(context) || responsiveUtils.isTabletLarge(context)) {
|
||||
return const EdgeInsets.symmetric(horizontal: 12);
|
||||
} else {
|
||||
return const EdgeInsets.symmetric(horizontal: 24);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user