TF-3410 Fix wrong text style avatar icon

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-03-12 14:41:11 +07:00
committed by Dat H. Pham
parent c4622a73a4
commit a31aec8c74
3 changed files with 15 additions and 5 deletions
@@ -162,6 +162,18 @@ class ThemeUtils {
color: color, color: color,
); );
static TextStyle textStyleHeadingH4({
Color? color,
FontWeight? fontWeight,
}) => TextStyle(
fontFamily: ConstantsUI.fontApp,
fontWeight: fontWeight ?? FontWeight.w500,
letterSpacing: 0.0,
fontSize: 32,
height: 40 / 32,
color: color,
);
static TextStyle textStyleHeadingHeadingSmall({ static TextStyle textStyleHeadingHeadingSmall({
Color? color, Color? color,
FontWeight? fontWeight, FontWeight? fontWeight,
@@ -1,5 +1,6 @@
import 'package:core/presentation/extensions/color_extension.dart'; import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/utils/theme_utils.dart';
import 'package:core/presentation/views/image/avatar_builder.dart'; import 'package:core/presentation/views/image/avatar_builder.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:model/email/presentation_email.dart'; import 'package:model/email/presentation_email.dart';
@@ -19,10 +20,7 @@ class EmailAvatarBuilder extends StatelessWidget {
return (AvatarBuilder() return (AvatarBuilder()
..text(emailSelected.getAvatarText()) ..text(emailSelected.getAvatarText())
..size(50) ..size(50)
..addTextStyle(const TextStyle( ..addTextStyle(ThemeUtils.textStyleHeadingH4(color: Colors.white))
fontWeight: FontWeight.bold,
fontSize: 21,
color: Colors.white))
..backgroundColor(AppColor.colorAvatar) ..backgroundColor(AppColor.colorAvatar)
..avatarColor(emailSelected.avatarColors)) ..avatarColor(emailSelected.avatarColors))
.build(); .build();
+1 -1
View File
@@ -103,7 +103,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
String getAvatarText() { String getAvatarText() {
if (getSenderName().isNotEmpty) { if (getSenderName().isNotEmpty) {
return getSenderName().firstLetterToUpperCase; return getSenderName().firstCharacterToUpperCase;
} }
return ''; return '';
} }