diff --git a/core/lib/presentation/utils/theme_utils.dart b/core/lib/presentation/utils/theme_utils.dart index 6a5f760fe..4d9a5d2a6 100644 --- a/core/lib/presentation/utils/theme_utils.dart +++ b/core/lib/presentation/utils/theme_utils.dart @@ -105,13 +105,12 @@ class ThemeUtils { Color? color, FontWeight? fontWeight, double? fontSize, - double? height, }) => TextStyle( fontFamily: ConstantsUI.fontApp, fontWeight: fontWeight ?? FontWeight.w500, letterSpacing: 0.0, fontSize: fontSize ?? 16, - height: (height ?? 20) / (fontSize ?? 16), + height: 20 / (fontSize ?? 16), color: color, ); @@ -158,13 +157,12 @@ class ThemeUtils { static TextStyle textStyleHeadingH6({ Color? color, FontWeight? fontWeight, - double? height, }) => TextStyle( fontFamily: ConstantsUI.fontApp, fontWeight: fontWeight ?? FontWeight.w700, letterSpacing: 0.0, fontSize: 20, - height: (height ?? 24) / 20, + height: 24 / 20, color: color, ); @@ -195,13 +193,12 @@ class ThemeUtils { static TextStyle textStyleHeadingHeadingSmall({ Color? color, FontWeight? fontWeight, - double? height, }) => TextStyle( fontFamily: ConstantsUI.fontApp, fontWeight: fontWeight ?? FontWeight.w500, letterSpacing: 0.0, fontSize: 17, - height: (height ?? 22) / 17, + height: 22 / 17, color: color, ); diff --git a/lib/features/email/presentation/widgets/email_receiver_widget.dart b/lib/features/email/presentation/widgets/email_receiver_widget.dart index 61ae43c5c..f7245c648 100644 --- a/lib/features/email/presentation/widgets/email_receiver_widget.dart +++ b/lib/features/email/presentation/widgets/email_receiver_widget.dart @@ -240,9 +240,8 @@ class _EmailReceiverWidgetState extends State { : '${emailAddress.asString()},', textStyle: ThemeUtils.textStyleHeadingHeadingSmall( color: Colors.black, - height: 17, fontWeight: FontWeight.w400, - ), + ).copyWith(height: 17), padding: const EdgeInsetsDirectional.symmetric(vertical: 2, horizontal: 8), backgroundColor: Colors.transparent, onTapActionCallback: () => widget.openEmailAddressDetailAction?.call(context, emailAddress), diff --git a/lib/features/email/presentation/widgets/email_sender_builder.dart b/lib/features/email/presentation/widgets/email_sender_builder.dart index 78449994f..9ae11e662 100644 --- a/lib/features/email/presentation/widgets/email_sender_builder.dart +++ b/lib/features/email/presentation/widgets/email_sender_builder.dart @@ -44,8 +44,7 @@ class EmailSenderBuilder extends StatelessWidget { customStyle: ThemeUtils.textStyleHeadingH6( color: Colors.black, fontWeight: FontWeight.w500, - height: 20, - ), + ).copyWith(height: 20), overflow: CommonTextStyle.defaultTextOverFlow, softWrap: CommonTextStyle.defaultSoftWrap ), diff --git a/lib/features/thread_detail/presentation/widgets/thread_detail_collapsed_email.dart b/lib/features/thread_detail/presentation/widgets/thread_detail_collapsed_email.dart index 53785e4c4..30a2516b0 100644 --- a/lib/features/thread_detail/presentation/widgets/thread_detail_collapsed_email.dart +++ b/lib/features/thread_detail/presentation/widgets/thread_detail_collapsed_email.dart @@ -83,11 +83,10 @@ class ThreadDetailCollapsedEmail extends StatelessWidget { maxLines: 1, overflow: TextOverflow.ellipsis, style: ThemeUtils.textStyleBodyBody1( - height: 24, fontWeight: presentationEmail.hasRead ? FontWeight.normal : FontWeight.w600, - ), + ).copyWith(height: 24), ), ), ],