Use fontFamily for all style in Text widget
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -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/toast/tmail_toast.dart';
|
||||
import 'package:core/presentation/views/toast/toast_position.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -106,7 +107,7 @@ class AppToast {
|
||||
},
|
||||
child: Text(
|
||||
actionName,
|
||||
style: TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textActionColor ?? Colors.white
|
||||
@@ -132,7 +133,7 @@ class AppToast {
|
||||
actionIcon,
|
||||
Text(
|
||||
actionName,
|
||||
style: TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textActionColor ?? Colors.white
|
||||
@@ -169,7 +170,7 @@ class AppToast {
|
||||
context,
|
||||
maxWidth: maxWidth ?? responsiveUtils.getMaxWidthToast(context),
|
||||
toastPosition: ToastPosition.BOTTOM,
|
||||
textStyle: textStyle ?? TextStyle(
|
||||
textStyle: textStyle ?? ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textColor ?? AppColor.primaryColor
|
||||
@@ -222,7 +223,7 @@ class AppToast {
|
||||
},
|
||||
child: Text(
|
||||
action.actionName!,
|
||||
style: TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textActionColor ?? Colors.white
|
||||
@@ -250,7 +251,7 @@ class AppToast {
|
||||
action.actionIcon!,
|
||||
Text(
|
||||
action.actionName!,
|
||||
style: TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textActionColor ?? Colors.white
|
||||
@@ -287,7 +288,7 @@ class AppToast {
|
||||
context,
|
||||
maxWidth: maxWidth ?? responsiveUtils.getMaxWidthToast(context),
|
||||
toastPosition: ToastPosition.BOTTOM,
|
||||
textStyle: textStyle ?? TextStyle(
|
||||
textStyle: textStyle ?? ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textColor ?? AppColor.primaryColor
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CommonTextStyle {
|
||||
static const textStyleNormal = TextStyle(
|
||||
color: AppColor.primaryColor,
|
||||
fontSize: 14,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.normal,
|
||||
);
|
||||
|
||||
static const defaultTextOverFlow = TextOverflow.ellipsis;
|
||||
|
||||
static const defaultSoftWrap = true;
|
||||
|
||||
@@ -307,6 +307,10 @@ class ThemeUtils {
|
||||
color: AppColor.gray424244.withOpacity(0.9),
|
||||
);
|
||||
|
||||
static const TextStyle defaultTextStyleInterFont = TextStyle(
|
||||
fontFamily: ConstantsUI.fontApp,
|
||||
);
|
||||
|
||||
static TextSelectionThemeData get _textSelectionTheme {
|
||||
return const TextSelectionThemeData(
|
||||
cursorColor: AppColor.primaryColor,
|
||||
@@ -316,12 +320,16 @@ class ThemeUtils {
|
||||
}
|
||||
|
||||
static AppBarTheme get _appBarTheme {
|
||||
return const AppBarTheme(
|
||||
return AppBarTheme(
|
||||
color: Colors.white,
|
||||
elevation: 0,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||
iconTheme: IconThemeData(color: Colors.black),
|
||||
titleTextStyle: TextStyle(color: Color(0XFF8B8B8B), fontSize: 18),
|
||||
iconTheme: const IconThemeData(color: Colors.black),
|
||||
titleTextStyle: defaultTextStyleInterFont.copyWith(
|
||||
color: const Color(0XFF8B8B8B),
|
||||
fontSize: 18,
|
||||
),
|
||||
toolbarTextStyle: defaultTextStyleInterFont,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user