Use fontFamily for all style in Text widget

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-07-15 09:26:07 +07:00
committed by Dat H. Pham
parent 991ab686a4
commit a9a322818a
186 changed files with 717 additions and 443 deletions
@@ -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';
import 'package:model/extensions/email_address_extension.dart';
@@ -31,7 +32,7 @@ class ContactQuickSearchItem extends StatelessWidget {
maxLines: 1,
softWrap: CommonTextStyle.defaultSoftWrap,
overflow: CommonTextStyle.defaultTextOverFlow,
style: const TextStyle(
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.normal
@@ -43,7 +44,7 @@ class ContactQuickSearchItem extends StatelessWidget {
maxLines: 1,
softWrap: CommonTextStyle.defaultSoftWrap,
overflow: CommonTextStyle.defaultTextOverFlow,
style: const TextStyle(
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
color: AppColor.colorHintSearchBar,
fontSize: 13,
fontWeight: FontWeight.normal
@@ -55,12 +55,12 @@ class EmailQuickSearchItemTileWidget extends StatelessWidget {
child: RichTextBuilder(
textOrigin: _getInformationSender(),
wordToStyle: searchQuery?.value ?? '',
styleOrigin: const TextStyle(
styleOrigin: ThemeUtils.defaultTextStyleInterFont.copyWith(
fontSize: 15,
fontWeight: FontWeight.w600,
color: Colors.black,
),
styleWord: TextStyle(
styleWord: ThemeUtils.defaultTextStyleInterFont.copyWith(
fontSize: 15,
fontWeight: FontWeight.w600,
color: Colors.black,
@@ -75,12 +75,12 @@ class EmailQuickSearchItemTileWidget extends StatelessWidget {
wordToStyle: searchQuery?.value ?? '',
preMarkedText: _presentationEmail.sanitizedSearchSnippetSubject,
ensureHighlightVisible: true,
styleOrigin: const TextStyle(
styleOrigin: ThemeUtils.defaultTextStyleInterFont.copyWith(
fontSize: 13,
color: Colors.black,
fontWeight: FontWeight.normal
),
styleWord: TextStyle(
styleWord: ThemeUtils.defaultTextStyleInterFont.copyWith(
fontSize: 13,
backgroundColor: Colors.amberAccent[200],
color: Colors.black,
@@ -98,7 +98,7 @@ class EmailQuickSearchItemTileWidget extends StatelessWidget {
maxLines: 1,
overflow: CommonTextStyle.defaultTextOverFlow,
softWrap: CommonTextStyle.defaultSoftWrap,
style: const TextStyle(
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black))
@@ -109,12 +109,12 @@ class EmailQuickSearchItemTileWidget extends StatelessWidget {
wordToStyle: searchQuery?.value ?? '',
preMarkedText: _presentationEmail.sanitizedSearchSnippetPreview,
ensureHighlightVisible: true,
styleOrigin: const TextStyle(
styleOrigin: ThemeUtils.defaultTextStyleInterFont.copyWith(
fontSize: 13,
color: AppColor.colorContentEmail,
fontWeight: FontWeight.normal
),
styleWord: TextStyle(
styleWord: ThemeUtils.defaultTextStyleInterFont.copyWith(
fontSize: 13,
color: AppColor.colorContentEmail,
backgroundColor: Colors.amberAccent[200],
@@ -28,7 +28,7 @@ class RecentSearchItemTileWidget extends StatelessWidget {
const SizedBox(width: 8),
Expanded(
child: Text(recentSearch.value,
style: const TextStyle(
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
fontSize: 15,
fontWeight: FontWeight.normal,
color: Colors.black)),