TF-248 Update list email, email content for tablet
This commit is contained in:
@@ -67,6 +67,7 @@ extension AppColor on Color {
|
||||
static const colorTextButton = Color(0xFF007AFF);
|
||||
static const colorHintSearchBar = Color(0xFF818C99);
|
||||
static const colorBgSearchBar = Color(0xFFEBEDF0);
|
||||
static const colorShadowBgContentEmail = Color(0x14000000);
|
||||
|
||||
static const mapGradientColor = [
|
||||
[Color(0xFF21D4FD), Color(0xFFB721FF)],
|
||||
|
||||
@@ -61,6 +61,11 @@ class ImagePaths {
|
||||
String get icFlagV2 => _getImagePath('ic_flag_v2.svg');
|
||||
String get icReadToast => _getImagePath('ic_read_toast.svg');
|
||||
String get icUnreadToast => _getImagePath('ic_unread_toast.svg');
|
||||
String get icReplyAllV2 => _getImagePath('ic_reply_all_v2.svg');
|
||||
String get icReplyV2 => _getImagePath('ic_reply_v2.svg');
|
||||
String get icForwardV2 => _getImagePath('ic_forward_v2.svg');
|
||||
String get icMoveEmail => _getImagePath('ic_move_email.svg');
|
||||
String get icUnreadEmail => _getImagePath('ic_unread_email.svg');
|
||||
|
||||
String _getImagePath(String imageName) {
|
||||
return AssetsPaths.images + imageName;
|
||||
|
||||
@@ -2,8 +2,9 @@ import 'package:flutter/widgets.dart';
|
||||
|
||||
class ResponsiveUtils {
|
||||
|
||||
static const int minDesktopWidth = 1200;
|
||||
static const int minDesktopWidth = 1366;
|
||||
static const int minTabletWidth = 600;
|
||||
static const int minTabletLargeWidth = 800;
|
||||
|
||||
static const double _loginTextFieldWidthSmallScreen = 280.0;
|
||||
static const double _loginTextFieldWidthLargeScreen = 320.0;
|
||||
@@ -20,11 +21,15 @@ class ResponsiveUtils {
|
||||
|
||||
double getSizeHeightScreen(BuildContext context) => MediaQuery.of(context).size.height;
|
||||
|
||||
double getMinSizeScreen(BuildContext context) => MediaQuery.of(context).size.shortestSide;
|
||||
|
||||
bool isMobile(BuildContext context) => getSizeWidthScreen(context) < minTabletWidth;
|
||||
|
||||
bool isTablet(BuildContext context) => getSizeWidthScreen(context) >= minTabletWidth && getSizeWidthScreen(context) < minDesktopWidth;
|
||||
bool isTablet(BuildContext context) => getSizeWidthScreen(context) >= minTabletWidth && getSizeWidthScreen(context) < minTabletLargeWidth;
|
||||
|
||||
bool isDesktop(BuildContext context) => getSizeWidthScreen(context) >= minDesktopWidth;
|
||||
bool isDesktop(BuildContext context) => getSizeWidthScreen(context) > minDesktopWidth;
|
||||
|
||||
bool isTabletLarge(BuildContext context) => getMinSizeScreen(context) >= minTabletLargeWidth && getMinSizeScreen(context) <= minDesktopWidth;
|
||||
|
||||
bool isPortrait(BuildContext context) => MediaQuery.of(context).orientation == Orientation.portrait;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||
class ResponsiveWidget extends StatelessWidget {
|
||||
final Widget mobile;
|
||||
final Widget tablet;
|
||||
final Widget? tabletLarge;
|
||||
final Widget? desktop;
|
||||
|
||||
final ResponsiveUtils responsiveUtils;
|
||||
@@ -13,6 +14,7 @@ class ResponsiveWidget extends StatelessWidget {
|
||||
required this.mobile,
|
||||
required this.tablet,
|
||||
this.desktop,
|
||||
this.tabletLarge,
|
||||
required this.responsiveUtils,
|
||||
}) : super(key: key);
|
||||
|
||||
@@ -23,6 +25,8 @@ class ResponsiveWidget extends StatelessWidget {
|
||||
return mobile;
|
||||
} else if (responsiveUtils.isDesktop(context)) {
|
||||
return desktop ?? tablet;
|
||||
} else if (responsiveUtils.isTabletLarge(context)) {
|
||||
return tabletLarge ?? tablet;
|
||||
} else if (responsiveUtils.isTablet(context)) {
|
||||
return tablet;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user