TF-612 App new design for list email rule filter
This commit is contained in:
@@ -131,6 +131,8 @@ extension AppColor on Color {
|
|||||||
static const colorSelectedRichTextButton = Color(0x99EBEDF0);
|
static const colorSelectedRichTextButton = Color(0x99EBEDF0);
|
||||||
static const colorShadowDestinationPicker = Color(0x33000000);
|
static const colorShadowDestinationPicker = Color(0x33000000);
|
||||||
static const colorBackgroundSnackBar = Color(0xFF343438);
|
static const colorBackgroundSnackBar = Color(0xFF343438);
|
||||||
|
static const colorBackgroundHeaderListRuleFilter = Color(0xFFFAF7F7);
|
||||||
|
static const colorBorderListRuleFilter = Color(0xFFE7E8EC);
|
||||||
static const colorBackgroundFieldConditionRulesFilter = Color(0xFFF2F3F5);
|
static const colorBackgroundFieldConditionRulesFilter = Color(0xFFF2F3F5);
|
||||||
static const colorDividerRuleFilter = Color(0xFFE7E8EC);
|
static const colorDividerRuleFilter = Color(0xFFE7E8EC);
|
||||||
|
|
||||||
|
|||||||
@@ -20,17 +20,7 @@ class EmailRulesView extends GetWidget<EmailRulesController> with AppLoaderMixin
|
|||||||
: Colors.white,
|
: Colors.white,
|
||||||
body: Container(
|
body: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
margin: _responsiveUtils.isWebDesktop(context)
|
margin: _getMarginView(context),
|
||||||
? const EdgeInsets.only(left: 48, right: 24, top: 24, bottom: 24)
|
|
||||||
: EdgeInsets.zero,
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(
|
|
||||||
_responsiveUtils.isWebDesktop(context) ? 20 : 0),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: _responsiveUtils.isWebDesktop(context) ? 24 : 10,
|
|
||||||
top: 24,
|
|
||||||
right: 24),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@@ -39,17 +29,37 @@ class EmailRulesView extends GetWidget<EmailRulesController> with AppLoaderMixin
|
|||||||
responsiveUtils: _responsiveUtils,
|
responsiveUtils: _responsiveUtils,
|
||||||
createRule: () => controller.goToCreateNewRule(),
|
createRule: () => controller.goToCreateNewRule(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 22),
|
SizedBox(height: _responsiveUtils.isWebDesktop(context) ? 24 : 16),
|
||||||
_buildLoadingView(),
|
_buildLoadingView(),
|
||||||
const Expanded(child: ListEmailRulesWidget())
|
const Expanded(child: ListEmailRulesWidget())
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EdgeInsets _getMarginView(BuildContext context) {
|
||||||
|
if (BuildUtils.isWeb) {
|
||||||
|
if (_responsiveUtils.isDesktop(context)) {
|
||||||
|
return const EdgeInsets.only(left: 16, top: 16, right: 24, bottom: 24);
|
||||||
|
} else if (_responsiveUtils.isTabletLarge(context) ||
|
||||||
|
_responsiveUtils.isTablet(context)) {
|
||||||
|
return const EdgeInsets.only(right: 32, top: 16, bottom: 16);
|
||||||
|
} else {
|
||||||
|
return const EdgeInsets.only(right: 32, top: 16, bottom: 16);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (_responsiveUtils.isDesktop(context) ||
|
||||||
|
_responsiveUtils.isLandscapeTablet(context) ||
|
||||||
|
_responsiveUtils.isTabletLarge(context) ||
|
||||||
|
_responsiveUtils.isTablet(context)) {
|
||||||
|
return const EdgeInsets.only(right: 32, top: 16, bottom: 16);
|
||||||
|
} else {
|
||||||
|
return const EdgeInsets.only(right: 32, top: 16, bottom: 16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildLoadingView() {
|
Widget _buildLoadingView() {
|
||||||
return Obx(() => controller.viewState.value.fold(
|
return Obx(() => controller.viewState.value.fold(
|
||||||
(failure) => const SizedBox.shrink(),
|
(failure) => const SizedBox.shrink(),
|
||||||
|
|||||||
+1
@@ -20,6 +20,7 @@ class EmailRulesHeaderWidget extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
padding: const EdgeInsets.all(24),
|
padding: const EdgeInsets.all(24),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColor.colorBackgroundWrapIconStyleCode,
|
color: AppColor.colorBackgroundWrapIconStyleCode,
|
||||||
|
|||||||
+14
-1
@@ -17,12 +17,24 @@ class ListEmailRulesWidget extends GetWidget<EmailRulesController> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColor.colorBackgroundWrapIconStyleCode,
|
color: AppColor.colorBackgroundWrapIconStyleCode,
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1,
|
||||||
|
color: AppColor.colorBorderListRuleFilter)
|
||||||
),
|
),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: AppColor.colorBackgroundHeaderListRuleFilter,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(16),
|
||||||
|
topRight: Radius.circular(16)),
|
||||||
|
),
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
vertical: 28,
|
vertical: 28,
|
||||||
horizontal: 24,
|
horizontal: 24,
|
||||||
@@ -59,6 +71,7 @@ class ListEmailRulesWidget extends GetWidget<EmailRulesController> {
|
|||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user