TF-3002 [WEB] Add To/Folder search filters
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class QuotasBannerStyles {
|
||||
static const double verticalPadding = 8;
|
||||
static const double horizontalPadding = 16;
|
||||
static const double iconPadding = 16;
|
||||
static const double iconSize = 32;
|
||||
static const double titleTextSize = 17;
|
||||
@@ -16,4 +16,29 @@ class QuotasBannerStyles {
|
||||
|
||||
static const FontWeight titleFontWeight = FontWeight.w700;
|
||||
static const FontWeight messageFontWeight = FontWeight.w400;
|
||||
|
||||
static const EdgeInsetsGeometry bannerPadding = EdgeInsetsDirectional.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 8,
|
||||
);
|
||||
static EdgeInsetsGeometry getBannerMargin(
|
||||
BuildContext context,
|
||||
ResponsiveUtils responsiveUtils
|
||||
) {
|
||||
if (PlatformInfo.isWeb) {
|
||||
if (responsiveUtils.isDesktop(context)) {
|
||||
return const EdgeInsetsDirectional.only(end: 16, bottom: 8);
|
||||
} else if (responsiveUtils.isTablet(context)) {
|
||||
return const EdgeInsetsDirectional.only(bottom: 8, start: 24, end: 24);
|
||||
} else {
|
||||
return const EdgeInsetsDirectional.only(bottom: 8, start: 12, end: 12);
|
||||
}
|
||||
} else {
|
||||
if (responsiveUtils.isPortraitTablet(context)) {
|
||||
return const EdgeInsetsDirectional.only(bottom: 8, start: 32, end: 32);
|
||||
} else {
|
||||
return const EdgeInsetsDirectional.only(bottom: 8, start: 16, end: 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,28 +8,23 @@ import 'package:tmail_ui_user/features/quotas/presentation/styles/quotas_banner_
|
||||
class QuotasBannerWidget extends StatelessWidget {
|
||||
|
||||
final QuotasController _quotasController = Get.find<QuotasController>();
|
||||
final EdgeInsetsGeometry? margin;
|
||||
|
||||
QuotasBannerWidget({
|
||||
Key? key,
|
||||
this.margin,
|
||||
}) : super(key: key);
|
||||
|
||||
QuotasBannerWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
if (_quotasController.octetsQuota.value != null && _quotasController.octetsQuota.value!.allowedDisplayToQuotaBanner) {
|
||||
final octetQuota = _quotasController.octetsQuota.value!;
|
||||
final octetQuota = _quotasController.octetsQuota.value;
|
||||
if (octetQuota != null && octetQuota.allowedDisplayToQuotaBanner) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: octetQuota.getQuotaBannerBackgroundColor(),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(QuotasBannerStyles.borderRadius)),
|
||||
),
|
||||
margin: margin,
|
||||
padding: const EdgeInsetsDirectional.symmetric(
|
||||
horizontal: QuotasBannerStyles.horizontalPadding,
|
||||
vertical: QuotasBannerStyles.verticalPadding,
|
||||
),
|
||||
margin: QuotasBannerStyles.getBannerMargin(
|
||||
context,
|
||||
_quotasController.responsiveUtils),
|
||||
padding: QuotasBannerStyles.bannerPadding,
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
|
||||
Reference in New Issue
Block a user