TF-46 Create object, builder for model and core module

This commit is contained in:
dab246
2021-08-26 17:03:04 +07:00
committed by Dat H. Pham
parent b70fc6edb8
commit 17bad5ec51
21 changed files with 203 additions and 12 deletions
@@ -46,4 +46,10 @@ extension AppColor on Color {
static const avatarTextColor = Color(0xFF3840F7);
static const sentTimeTextColorUnRead = Color(0xFF182952);
static const subjectEmailTextColorUnRead = Color(0xFF3840F7);
static const dividerColor = Color(0xFFEAEAEA);
static const bgComposer = Color(0xFFFBFBFF);
static const emailAddressChipColor = Color(0xFFF5F5F7);
static const enableSendEmailButtonColor = Color(0xFF3840F7);
static const disableSendEmailButtonColor = Color(0xFFACAFFF);
static const borderLeftEmailContentColor = Color(0xFFEFEFEF);
}
@@ -12,4 +12,18 @@ extension HtmlExtension on String {
String removeMaxHeightZeroPixel() => replaceAll(RegExp('max-height:0px;'), '');
String changeStyleBackground() => replaceAll(RegExp('background:'), 'background-color:');
String addBorderLefForBlockQuote() => replaceAll(RegExp('<blockquote'), '<blockquote style=\"margin-left:8px;margin-right:8px;padding-left:12px;padding-right:12px;border-left:6px solid #EFEFEF;\"');
String addBlockTag(String tag, {String? attribute}) => attribute != null ? '<$tag $attribute>$this</$tag>' : '<$tag>$this</$tag>';
String addNewLineTag({int count = 1}) {
if (count == 1) return '$this<br>';
var htmlString = this;
for (var i = 0; i < count; i++) {
htmlString = '$htmlString<br>';
}
return htmlString;
}
}