Apply new style for profile avatar setting

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-07-11 03:14:03 +07:00
committed by Dat H. Pham
parent c1938ce31b
commit 969d5b946e
2 changed files with 14 additions and 12 deletions
@@ -7,6 +7,7 @@ class UserAvatarBuilder extends StatelessWidget {
final double? size; final double? size;
final TextStyle? textStyle; final TextStyle? textStyle;
final EdgeInsetsGeometry? padding; final EdgeInsetsGeometry? padding;
final TextStyle? textStyle;
final VoidCallback? onTapAction; final VoidCallback? onTapAction;
const UserAvatarBuilder({ const UserAvatarBuilder({
@@ -15,6 +16,7 @@ class UserAvatarBuilder extends StatelessWidget {
this.size, this.size,
this.textStyle, this.textStyle,
this.padding, this.padding,
this.textStyle,
this.onTapAction, this.onTapAction,
}) : super(key: key); }) : super(key: key);
@@ -1,10 +1,9 @@
import 'package:core/presentation/extensions/color_extension.dart'; import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/extensions/string_extension.dart'; import 'package:core/presentation/utils/theme_utils.dart';
import 'package:core/presentation/views/image/avatar_builder.dart';
import 'package:core/utils/platform_info.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:tmail_ui_user/features/base/widget/material_text_button.dart'; import 'package:tmail_ui_user/features/base/widget/material_text_button.dart';
import 'package:tmail_ui_user/features/base/widget/user_avatar_builder.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart'; import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
typedef OnSubtitleClick = void Function(); typedef OnSubtitleClick = void Function();
@@ -34,15 +33,16 @@ class UserInformationWidget extends StatelessWidget {
padding: padding ?? const EdgeInsetsDirectional.only(start: 16, end: 4, top: 16, bottom: 16), padding: padding ?? const EdgeInsetsDirectional.only(start: 16, end: 4, top: 16, bottom: 16),
decoration: BoxDecoration(border: border), decoration: BoxDecoration(border: border),
child: Row(children: [ child: Row(children: [
(AvatarBuilder() UserAvatarBuilder(
..text(userName.firstCharacterToUpperCase) username: userName,
..backgroundColor(Colors.white) size: 51,
..textColor(Colors.black) textStyle: ThemeUtils.textStyleInter500().copyWith(
..addBoxShadows([const BoxShadow( fontSize: 25.5,
color: AppColor.colorShadowBgContentEmail, height: 38.3 / 25.5,
spreadRadius: 1, blurRadius: 1, offset: Offset(0, 0.5))]) letterSpacing: 0.24,
..size(PlatformInfo.isWeb ? 48 : 56)) color: Colors.white,
.build(), ),
),
const SizedBox(width: 16), const SizedBox(width: 16),
Expanded(child: Column( Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,