TF-355 Fix the empty mailbox message not correct when filtering
This commit is contained in:
@@ -171,6 +171,7 @@ extension AppColor on Color {
|
||||
static const colorThumbScrollBar = Color(0xFFAEB7C2);
|
||||
static const colorCreateNewIdentityButton = Color(0xFFEBEDF0);
|
||||
static const colorSpamReportBox = Color(0xFFBFDEFF);
|
||||
static const colorSubtitle = Color(0xFF6D7885);
|
||||
|
||||
static const mapGradientColor = [
|
||||
[Color(0xFF21D4FD), Color(0xFFB721FF)],
|
||||
|
||||
@@ -12,7 +12,7 @@ class ImagePaths {
|
||||
String get icDownload => _getImagePath('ic_download.svg');
|
||||
String get icMore => _getImagePath('ic_more.svg');
|
||||
String get icPhotoLibrary => _getImagePath('ic_photo_library.svg');
|
||||
String get icEmptyImageDefault => _getImagePath('empty_image_default.svg');
|
||||
String get icEmptyEmail => _getImagePath('ic_empty_email.svg');
|
||||
String get icStar => _getImagePath('ic_star.svg');
|
||||
String get icUnStar => _getImagePath('ic_unstar.svg');
|
||||
String get icAttachment => _getImagePath('ic_attachment.svg');
|
||||
|
||||
@@ -1,55 +1,85 @@
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
class BackgroundWidgetBuilder {
|
||||
Key? _key;
|
||||
SvgPicture? _image;
|
||||
String? _text;
|
||||
class BackgroundWidgetBuilder extends StatelessWidget {
|
||||
|
||||
final BuildContext _context;
|
||||
final ResponsiveUtils responsiveUtils;
|
||||
final String title;
|
||||
final String? iconSVG;
|
||||
final String? subTitle;
|
||||
final double? maxWidth;
|
||||
|
||||
BackgroundWidgetBuilder(this._context);
|
||||
const BackgroundWidgetBuilder(
|
||||
this.title,
|
||||
this.responsiveUtils, {
|
||||
Key? key,
|
||||
this.iconSVG,
|
||||
this.subTitle,
|
||||
this.maxWidth
|
||||
}) : super(key: key);
|
||||
|
||||
void key(Key key) {
|
||||
_key = key;
|
||||
}
|
||||
|
||||
void image(SvgPicture image) {
|
||||
_image = image;
|
||||
}
|
||||
|
||||
void text(String text) {
|
||||
_text = text;
|
||||
}
|
||||
|
||||
Widget build() {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
key: _key ?? const Key('BackgroundWidgetBuilder'),
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
SliverFillRemaining(
|
||||
child: SizedBox(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
_image ?? const SizedBox.shrink(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: _image != null ? 16 : 0),
|
||||
child: Text(
|
||||
_text ?? '',
|
||||
style: const TextStyle(color: AppColor.baseTextColor, fontSize: 16),
|
||||
textAlign: TextAlign.center,
|
||||
key: const Key('background_widget'),
|
||||
child: SizedBox(
|
||||
width: maxWidth ?? 360,
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
SliverFillRemaining(
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
if (iconSVG != null)
|
||||
SvgPicture.asset(
|
||||
iconSVG!,
|
||||
width: responsiveUtils.isLandscapeMobile(context)
|
||||
? 120
|
||||
: 212,
|
||||
height: responsiveUtils.isLandscapeMobile(context)
|
||||
? 120
|
||||
: 212,
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: iconSVG != null ? 12 : 0),
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.normal
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
if (subTitle != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 12),
|
||||
child: Text(
|
||||
subTitle!,
|
||||
style: const TextStyle(
|
||||
color: AppColor.colorSubtitle,
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.normal
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
height: MediaQuery.of(context).size.height,
|
||||
),
|
||||
height: MediaQuery.of(_context).size.height,
|
||||
),
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user