TF-313 Apply new ui for subject, address, body EmailView

This commit is contained in:
dab246
2022-03-09 17:45:34 +07:00
committed by Dat H. Pham
parent 9ce398d937
commit a59ef34df4
12 changed files with 269 additions and 66 deletions
@@ -39,4 +39,15 @@ extension DateTimeNullableExtension on DateTime? {
}
return 'yMMMd';
}
String toPatternForEmailView() {
if (this != null) {
if (this!.isThisYear()) {
return 'dd.MM, HH:mm';
} else {
return 'dd/MM/yyyy';
}
}
return 'dd/MM/yyyy';
}
}
@@ -90,6 +90,9 @@ extension AppColor on Color {
static const colorDividerComposer = Color(0xFFC6C6C8);
static const colorDividerEmailView = Color(0xFFD7D8D9);
static const colorButton = Color(0xFF959DAD);
static const colorTime = Color(0xFF92A1B4);
static const colorEmailAddressPrefix = Color(0xFF9AA7B6);
static const colorEmailAddressTag = Color(0x146D7885);
static const mapGradientColor = [
[Color(0xFF21D4FD), Color(0xFFB721FF)],
@@ -12,6 +12,7 @@ class AvatarBuilder {
OnTapAvatarActionClick? _onTapAvatarActionClick;
List<Color>? _avatarColors;
List<BoxShadow>? _boxShadows;
TextStyle? _textStyle;
void key(Key key) {
_key = key;
@@ -41,6 +42,10 @@ class AvatarBuilder {
_boxShadows = boxShadows;
}
void addTextStyle(TextStyle? textStyle) {
_textStyle = textStyle;
}
void addOnTapActionClick(OnTapAvatarActionClick onTapAvatarActionClick) {
_onTapAvatarActionClick = onTapAvatarActionClick;
}
@@ -81,7 +86,7 @@ class AvatarBuilder {
),
child: Text(
'${_text ?? ''}',
style: TextStyle(fontSize: 20, color: _textColor ?? AppColor.avatarTextColor, fontWeight: FontWeight.w500)
style: _textStyle ?? TextStyle(fontSize: 20, color: _textColor ?? AppColor.avatarTextColor, fontWeight: FontWeight.w500)
)
),
],