TF-3410 Fix wrong text style avatar icon
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -162,6 +162,18 @@ class ThemeUtils {
|
||||
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({
|
||||
Color? color,
|
||||
FontWeight? fontWeight,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
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:flutter/material.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
@@ -19,10 +20,7 @@ class EmailAvatarBuilder extends StatelessWidget {
|
||||
return (AvatarBuilder()
|
||||
..text(emailSelected.getAvatarText())
|
||||
..size(50)
|
||||
..addTextStyle(const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 21,
|
||||
color: Colors.white))
|
||||
..addTextStyle(ThemeUtils.textStyleHeadingH4(color: Colors.white))
|
||||
..backgroundColor(AppColor.colorAvatar)
|
||||
..avatarColor(emailSelected.avatarColors))
|
||||
.build();
|
||||
|
||||
@@ -103,7 +103,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
|
||||
String getAvatarText() {
|
||||
if (getSenderName().isNotEmpty) {
|
||||
return getSenderName().firstLetterToUpperCase;
|
||||
return getSenderName().firstCharacterToUpperCase;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user