Use fontFamily for all style in Text widget
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -44,7 +44,7 @@ mixin BaseEmailItemTile {
|
||||
color: AppColor.backgroundCounterMailboxColor),
|
||||
child: TextOverflowBuilder(
|
||||
email.mailboxContain?.getDisplayName(context) ?? '',
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontFamily: ConstantsUI.fontApp,
|
||||
fontSize: 10,
|
||||
color: AppColor.emailMailboxContainColor,
|
||||
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/filter_message_option.dart';
|
||||
|
||||
@@ -21,10 +22,11 @@ class DefaultWebAppBarThreadWidgetStyle {
|
||||
static const EdgeInsetsGeometry mailboxMenuPadding = EdgeInsets.all(5);
|
||||
static const EdgeInsetsGeometry titlePadding = EdgeInsets.symmetric(horizontal: 16);
|
||||
|
||||
static const TextStyle titleTextStyle = TextStyle(
|
||||
static TextStyle titleTextStyle =
|
||||
ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 21,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
static Color getFilterButtonColor(FilterMessageOption option) {
|
||||
|
||||
+6
-3
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/filter_message_option.dart';
|
||||
|
||||
@@ -22,15 +23,17 @@ class MobileAppBarThreadWidgetStyle {
|
||||
static const EdgeInsetsGeometry mailboxMenuPadding = EdgeInsets.all(5);
|
||||
static const EdgeInsetsGeometry titlePadding = EdgeInsets.symmetric(horizontal: 16);
|
||||
|
||||
static const TextStyle emailCounterTitleStyle = TextStyle(
|
||||
static TextStyle emailCounterTitleStyle =
|
||||
ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColor.steelGrayA540,
|
||||
);
|
||||
static const TextStyle titleTextStyle = TextStyle(
|
||||
static TextStyle titleTextStyle =
|
||||
ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 21,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
static Color getFilterButtonColor(FilterMessageOption option) {
|
||||
return option == FilterMessageOption.all
|
||||
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SelectionWebAppBarThreadWidgetStyle {
|
||||
@@ -18,9 +19,10 @@ class SelectionWebAppBarThreadWidgetStyle {
|
||||
}
|
||||
}
|
||||
|
||||
static const TextStyle emailCounterStyle = TextStyle(
|
||||
static TextStyle emailCounterStyle =
|
||||
ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColor.steelGrayA540
|
||||
color: AppColor.steelGrayA540,
|
||||
);
|
||||
}
|
||||
+6
-4
@@ -1,17 +1,19 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TitleAppBarThreadWidgetStyle {
|
||||
static const EdgeInsetsGeometry padding = EdgeInsets.symmetric(vertical: 8, horizontal: 16);
|
||||
|
||||
static const TextStyle titleStyle = TextStyle(
|
||||
static TextStyle titleStyle = ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 21,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w700
|
||||
fontWeight: FontWeight.w700,
|
||||
);
|
||||
static const TextStyle filterOptionStyle = TextStyle(
|
||||
static TextStyle filterOptionStyle =
|
||||
ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 11,
|
||||
color: AppColor.colorContentEmail
|
||||
color: AppColor.colorContentEmail,
|
||||
);
|
||||
}
|
||||
@@ -549,7 +549,7 @@ class ThreadView extends GetWidget<ThreadController>
|
||||
!presentationEmail.hasRead
|
||||
? AppLocalizations.of(context).mark_as_read
|
||||
: AppLocalizations.of(context).mark_as_unread,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
@@ -576,7 +576,7 @@ class ThreadView extends GetWidget<ThreadController>
|
||||
const SizedBox(width: 11),
|
||||
Text(
|
||||
AppLocalizations.of(context).archiveMessage,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
@@ -707,7 +707,7 @@ class ThreadView extends GetWidget<ThreadController>
|
||||
() => Text(
|
||||
AppLocalizations.of(context).moveConversation(controller.listEmailDrag.length),
|
||||
overflow: TextOverflow.clip,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:model/email/email_action_type.dart';
|
||||
@@ -58,7 +59,10 @@ class BottomBarThreadSelectionWidget extends StatelessWidget{
|
||||
textAlign: TextAlign.center,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
||||
backgroundColor: Colors.transparent,
|
||||
textStyle: const TextStyle(fontSize: 12, color: AppColor.steelGrayA540),
|
||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 12,
|
||||
color: AppColor.steelGrayA540,
|
||||
),
|
||||
verticalDirection: _verticalDirection(context),
|
||||
onTapActionCallback: () {
|
||||
onPressEmailSelectionActionClick?.call(
|
||||
@@ -84,7 +88,10 @@ class BottomBarThreadSelectionWidget extends StatelessWidget{
|
||||
textAlign: TextAlign.center,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
||||
backgroundColor: Colors.transparent,
|
||||
textStyle: const TextStyle(fontSize: 12, color: AppColor.steelGrayA540),
|
||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 12,
|
||||
color: AppColor.steelGrayA540,
|
||||
),
|
||||
verticalDirection: _verticalDirection(context),
|
||||
onTapActionCallback: () {
|
||||
onPressEmailSelectionActionClick?.call(
|
||||
@@ -107,7 +114,10 @@ class BottomBarThreadSelectionWidget extends StatelessWidget{
|
||||
flexibleText: true,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
||||
backgroundColor: Colors.transparent,
|
||||
textStyle: const TextStyle(fontSize: 12, color: AppColor.steelGrayA540),
|
||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 12,
|
||||
color: AppColor.steelGrayA540,
|
||||
),
|
||||
verticalDirection: _verticalDirection(context),
|
||||
onTapActionCallback: () {
|
||||
onPressEmailSelectionActionClick?.call(EmailActionType.moveToMailbox, _listSelectionEmail);
|
||||
@@ -129,7 +139,10 @@ class BottomBarThreadSelectionWidget extends StatelessWidget{
|
||||
textAlign: TextAlign.center,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
||||
backgroundColor: Colors.transparent,
|
||||
textStyle: const TextStyle(fontSize: 12, color: AppColor.steelGrayA540),
|
||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 12,
|
||||
color: AppColor.steelGrayA540,
|
||||
),
|
||||
verticalDirection: _verticalDirection(context),
|
||||
onTapActionCallback: () {
|
||||
if (_currentMailbox?.isSpam == true) {
|
||||
@@ -152,7 +165,10 @@ class BottomBarThreadSelectionWidget extends StatelessWidget{
|
||||
textAlign: TextAlign.center,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
||||
backgroundColor: Colors.transparent,
|
||||
textStyle: const TextStyle(fontSize: 12, color: AppColor.steelGrayA540),
|
||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 12,
|
||||
color: AppColor.steelGrayA540,
|
||||
),
|
||||
verticalDirection: _verticalDirection(context),
|
||||
onTapActionCallback: () {
|
||||
if (canDeletePermanently) {
|
||||
|
||||
@@ -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/button/icon_button_web.dart';
|
||||
import 'package:core/presentation/views/responsive/responsive_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -295,7 +296,7 @@ class _EmailTileBuilderState extends State<EmailTileBuilder> with BaseEmailItem
|
||||
buildIconAvatarText(
|
||||
widget.presentationEmail,
|
||||
iconSize: 32,
|
||||
textStyle: const TextStyle(
|
||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:core/presentation/views/button/icon_button_web.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:core/presentation/views/text/text_field_builder.dart';
|
||||
@@ -126,7 +127,7 @@ class SearchAppBarWidget extends StatelessWidget {
|
||||
textDirection: DirectionUtils.getDirectionByLanguage(context),
|
||||
autoFocus: autoFocus ?? true,
|
||||
focusNode: searchFocusNode,
|
||||
textStyle: inputTextStyle ?? const TextStyle(
|
||||
textStyle: inputTextStyle ?? ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
color: AppColor.colorNameEmail,
|
||||
fontSize: 17
|
||||
),
|
||||
@@ -136,11 +137,15 @@ class SearchAppBarWidget extends StatelessWidget {
|
||||
enabledBorder: InputBorder.none,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
hintText: hintText,
|
||||
hintStyle: inputHintTextStyle ?? const TextStyle(
|
||||
hintStyle: inputHintTextStyle ?? ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
color: AppColor.colorHintSearchBar,
|
||||
fontSize: 17.0
|
||||
),
|
||||
labelStyle: const TextStyle(color: AppColor.colorHintSearchBar, fontSize: 17.0)),
|
||||
labelStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
color: AppColor.colorHintSearchBar,
|
||||
fontSize: 17.0,
|
||||
),
|
||||
),
|
||||
controller: searchInputController,
|
||||
);
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/style_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:tmail_ui_user/features/thread/presentation/styles/spam_banner/spam_report_banner_button_styles.dart';
|
||||
@@ -42,7 +43,7 @@ class SpamReportBannerButtonWidget extends StatelessWidget {
|
||||
? Text(
|
||||
label,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: SpamReportBannerButtonStyles.labelTextSize,
|
||||
color: labelColor,
|
||||
fontWeight: FontWeight.w400
|
||||
@@ -67,7 +68,7 @@ class SpamReportBannerButtonWidget extends StatelessWidget {
|
||||
textAlign: TextAlign.center,
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
softWrap: CommonTextStyle.defaultSoftWrap,
|
||||
style: TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: SpamReportBannerButtonStyles.labelTextSize,
|
||||
color: labelColor,
|
||||
fontWeight: FontWeight.w400
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -35,7 +36,7 @@ class SpamReportBannerLabelWidget extends StatelessWidget {
|
||||
Text(
|
||||
AppLocalizations.of(context).countNewSpamEmails(countSpamEmailsAsString),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: SpamReportBannerLabelStyles.labelTextSize,
|
||||
color: labelColor,
|
||||
fontWeight: FontWeight.w500
|
||||
@@ -46,7 +47,7 @@ class SpamReportBannerLabelWidget extends StatelessWidget {
|
||||
child: Text(
|
||||
AppLocalizations.of(context).countNewSpamEmails(countSpamEmailsAsString),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: SpamReportBannerLabelStyles.labelTextSize,
|
||||
color: labelColor,
|
||||
fontWeight: FontWeight.w500
|
||||
|
||||
Reference in New Issue
Block a user