Use fontFamily for all style in Text widget
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:core/presentation/constants/constants_ui.dart';
|
||||
import 'package:core/presentation/extensions/capitalize_extension.dart';
|
||||
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:core/presentation/views/button/icon_button_web.dart';
|
||||
import 'package:core/presentation/views/responsive/responsive_widget.dart';
|
||||
import 'package:core/utils/html/html_utils.dart';
|
||||
@@ -105,7 +106,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
|
||||
)),
|
||||
const SizedBox(height: 32),
|
||||
Text(AppLocalizations.of(context).signature,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 14,
|
||||
color: AppColor.colorContentEmail,
|
||||
@@ -430,7 +431,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
|
||||
textAlign: TextAlign.center,
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
softWrap: CommonTextStyle.defaultSoftWrap,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20,
|
||||
color: Colors.black
|
||||
@@ -621,7 +622,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
|
||||
Widget _buildCancelButton(BuildContext context, {double? width}) {
|
||||
return buildTextButton(
|
||||
AppLocalizations.of(context).cancel,
|
||||
textStyle: const TextStyle(
|
||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 17,
|
||||
color: AppColor.colorTextButton,
|
||||
|
||||
+9
-4
@@ -2,6 +2,7 @@
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/style_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -32,7 +33,7 @@ class IdentityDropListFieldBuilder extends StatelessWidget {
|
||||
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Text(
|
||||
_label,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColor.colorContentEmail)),
|
||||
@@ -40,11 +41,15 @@ class IdentityDropListFieldBuilder extends StatelessWidget {
|
||||
DropdownButtonHideUnderline(
|
||||
child: DropdownButton2<EmailAddress>(
|
||||
isExpanded: true,
|
||||
hint: const Row(
|
||||
hint: Row(
|
||||
children: [
|
||||
Expanded(child: Text(
|
||||
'',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.normal, color: Colors.black),
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.black,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
softWrap: CommonTextStyle.defaultSoftWrap,
|
||||
@@ -55,7 +60,7 @@ class IdentityDropListFieldBuilder extends StatelessWidget {
|
||||
value: item,
|
||||
child: Text(
|
||||
item.emailAddress,
|
||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.normal, color: Colors.black),
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(fontSize: 16, fontWeight: FontWeight.normal, color: Colors.black),
|
||||
maxLines: 1,
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
softWrap: CommonTextStyle.defaultSoftWrap,
|
||||
|
||||
+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:jmap_dart_client/jmap/mail/email/email_address.dart';
|
||||
|
||||
@@ -20,7 +21,7 @@ class IdentityFieldNoEditableBuilder extends StatelessWidget {
|
||||
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Text(
|
||||
_label,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColor.colorContentEmail)),
|
||||
@@ -36,7 +37,7 @@ class IdentityFieldNoEditableBuilder extends StatelessWidget {
|
||||
color: AppColor.colorInputBackgroundCreateMailbox),
|
||||
child: Text(
|
||||
_emailAddressSelected?.email ?? '',
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColor.colorInputBorderCreateMailbox),
|
||||
|
||||
+3
-3
@@ -22,13 +22,13 @@ class IdentityInputDecorationBuilder extends InputDecorationBuilder {
|
||||
prefixText: prefixText,
|
||||
labelText: labelText,
|
||||
floatingLabelBehavior: FloatingLabelBehavior.never,
|
||||
labelStyle: labelStyle ?? const TextStyle(color: Colors.black, fontSize: 16),
|
||||
labelStyle: labelStyle ?? ThemeUtils.defaultTextStyleInterFont.copyWith(color: Colors.black, fontSize: 16),
|
||||
hintText: hintText,
|
||||
isDense: true,
|
||||
hintStyle: hintStyle ?? const TextStyle(color: AppColor.colorHintInputCreateMailbox, fontSize: 16),
|
||||
hintStyle: hintStyle ?? ThemeUtils.defaultTextStyleInterFont.copyWith(color: AppColor.colorHintInputCreateMailbox, fontSize: 16),
|
||||
contentPadding: contentPadding ?? const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
|
||||
errorText: errorText?.isNotEmpty == true ? errorText : null,
|
||||
errorStyle: errorTextStyle ?? const TextStyle(color: AppColor.colorInputBorderErrorVerifyName, fontSize: 13),
|
||||
errorStyle: errorTextStyle ?? ThemeUtils.defaultTextStyleInterFont.copyWith(color: AppColor.colorInputBorderErrorVerifyName, fontSize: 13),
|
||||
filled: true,
|
||||
fillColor: errorText?.isNotEmpty == true
|
||||
? AppColor.colorInputBackgroundErrorVerifyName
|
||||
|
||||
+3
-2
@@ -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/text/text_field_builder.dart';
|
||||
import 'package:core/utils/direction_utils.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
@@ -37,7 +38,7 @@ class IdentityInputFieldBuilder extends StatelessWidget {
|
||||
Text(
|
||||
isMandatory
|
||||
? '$_label ($requiredIndicator)'
|
||||
: _label, style: const TextStyle(
|
||||
: _label, style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColor.colorContentEmail)),
|
||||
@@ -50,7 +51,7 @@ class IdentityInputFieldBuilder extends StatelessWidget {
|
||||
textDirection: DirectionUtils.getDirectionByLanguage(context),
|
||||
controller: editingController,
|
||||
focusNode: focusNode,
|
||||
textStyle: const TextStyle(color: Colors.black, fontSize: 16),
|
||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(color: Colors.black, fontSize: 16),
|
||||
keyboardType: inputType ?? TextInputType.text,
|
||||
semanticLabel: 'Identity input field',
|
||||
decoration: (IdentityInputDecorationBuilder()
|
||||
|
||||
+3
-2
@@ -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/text/type_ahead_form_field_builder.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -36,7 +37,7 @@ class IdentityInputWithDropListFieldBuilder extends StatelessWidget {
|
||||
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Text(
|
||||
_label,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColor.colorContentEmail)),
|
||||
@@ -67,7 +68,7 @@ class IdentityInputWithDropListFieldBuilder extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
child: Text(
|
||||
emailAddress.email ?? '',
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.black)));
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
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/semantics/checkbox_semantics.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -53,7 +54,7 @@ class SetDefaultIdentityCheckboxBuilder extends StatelessWidget {
|
||||
Flexible(
|
||||
child: Text(
|
||||
AppLocalizations.of(context).setDefaultIdentity,
|
||||
style: const TextStyle(
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 14,
|
||||
color: AppColor.colorSettingExplanation,
|
||||
|
||||
Reference in New Issue
Block a user