TF-3410 Use TextTheme apply almost text style for text widget
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -1187,18 +1187,6 @@ class ComposerController extends BaseController
|
||||
height: 40,
|
||||
colorFilter: AppColor.colorBackgroundQuotasWarning.asFilter(),
|
||||
),
|
||||
messageStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 14,
|
||||
color: AppColor.colorTextBody
|
||||
),
|
||||
actionStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 17,
|
||||
color: Colors.white
|
||||
),
|
||||
cancelStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 17,
|
||||
color: Colors.black
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2264,23 +2252,6 @@ class ComposerController extends BaseController
|
||||
height: 40,
|
||||
colorFilter: AppColor.colorBackgroundQuotasWarning.asFilter(),
|
||||
),
|
||||
titleStyle: Theme.of(context).textTheme.labelLarge?.copyWith(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black
|
||||
),
|
||||
messageStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 14,
|
||||
color: AppColor.colorTextBody
|
||||
),
|
||||
actionStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 17,
|
||||
color: Colors.white
|
||||
),
|
||||
cancelStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 17,
|
||||
color: Colors.black
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2482,18 +2453,6 @@ class ComposerController extends BaseController
|
||||
height: 40,
|
||||
colorFilter: AppColor.colorBackgroundQuotasWarning.asFilter(),
|
||||
),
|
||||
messageStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 14,
|
||||
color: AppColor.colorTextBody
|
||||
),
|
||||
actionStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 17,
|
||||
color: Colors.white
|
||||
),
|
||||
cancelStyle: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 17,
|
||||
color: Colors.black
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ extension ComposerPrintDraftExtension on ComposerController {
|
||||
child: PrintDraftDialogView(
|
||||
emailPrint: DraftEmailPrint(
|
||||
appName: appLocalizations.app_name,
|
||||
userName: mailboxDashBoardController.userEmail,
|
||||
userName: mailboxDashBoardController.getOwnEmailAddress(),
|
||||
attachments: uploadController.allAttachmentsUploaded,
|
||||
emailContent: emailContent,
|
||||
fromPrefix: appLocalizations.from_email_address_prefix,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
import 'package:core/presentation/constants/constants_ui.dart';
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/styles/composer_style.dart';
|
||||
|
||||
@@ -30,15 +32,19 @@ class RecipientComposerWidgetStyle {
|
||||
static const EdgeInsetsGeometry enableRecipientButtonMargin = EdgeInsetsDirectional.only(top: 10);
|
||||
|
||||
static const TextStyle prefixButtonTextStyle = TextStyle(
|
||||
fontFamily: ConstantsUI.fontApp,
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 24 / 15,
|
||||
letterSpacing: -0.01,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: AppColor.m3Neutral70,
|
||||
color: AppColor.m3Neutral70,
|
||||
);
|
||||
static const TextStyle inputTextStyle = TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black
|
||||
static final TextStyle inputTextStyle = ThemeUtils.textStyleBodyBody1(
|
||||
color: AppColor.m3SurfaceBackground,
|
||||
);
|
||||
static final TextStyle prefixLabelTextStyle = ThemeUtils.textStyleBodyBody1(
|
||||
color: AppColor.m3Tertiary,
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SubjectComposerWidgetStyle {
|
||||
@@ -8,9 +9,10 @@ class SubjectComposerWidgetStyle {
|
||||
static const Color cursorColor = AppColor.primaryColor;
|
||||
static const Color borderColor = AppColor.colorLineComposer;
|
||||
|
||||
static const TextStyle inputTextStyle = TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500
|
||||
static final TextStyle labelTextStyle = ThemeUtils.textStyleBodyBody1(
|
||||
color: AppColor.m3Tertiary,
|
||||
);
|
||||
static final TextStyle inputTextStyle = ThemeUtils.textStyleBodyBody1(
|
||||
color: AppColor.m3SurfaceBackground,
|
||||
);
|
||||
}
|
||||
+6
@@ -1,8 +1,11 @@
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class FromComposerDropDownWidgetStyle {
|
||||
FromComposerDropDownWidgetStyle._();
|
||||
|
||||
static const double space = 8.0;
|
||||
static const double dropdownItemSpace = 12.0;
|
||||
static const double avatarSize = 48.0;
|
||||
@@ -90,4 +93,7 @@ class FromComposerDropDownWidgetStyle {
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColor.colorLabelComposer
|
||||
);
|
||||
static final TextStyle prefixLabelTextStyle = ThemeUtils.textStyleBodyBody1(
|
||||
color: AppColor.m3Tertiary,
|
||||
);
|
||||
}
|
||||
@@ -147,11 +147,7 @@ class _RecipientComposerWidgetState extends State<RecipientComposerWidget> {
|
||||
child: Text(
|
||||
'${widget.prefix.asName(context)}:',
|
||||
key: Key('prefix_${widget.prefix.name}_recipient_composer_widget'),
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColor.m3Tertiary,
|
||||
),
|
||||
style: RecipientComposerWidgetStyle.prefixLabelTextStyle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: RecipientComposerWidgetStyle.space),
|
||||
|
||||
@@ -147,7 +147,7 @@ class RecipientTagItemWidget extends StatelessWidget {
|
||||
if (isLatestTagFocused && isLatestEmail) {
|
||||
return AppColor.colorItemRecipientSelected;
|
||||
} else if (EmailUtils.isEmailAddressValid(currentEmailAddress.emailAddress)) {
|
||||
return AppColor.colorF3F6F9;
|
||||
return AppColor.grayBackgroundColor;
|
||||
} else {
|
||||
return Colors.white;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/views/text/text_field_builder.dart';
|
||||
import 'package:core/utils/direction_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -39,11 +38,7 @@ class SubjectComposerWidget extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'${AppLocalizations.of(context).subject_email}:',
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColor.m3Tertiary,
|
||||
),
|
||||
style: SubjectComposerWidgetStyle.labelTextStyle,
|
||||
),
|
||||
const SizedBox(width:SubjectComposerWidgetStyle.space),
|
||||
Expanded(
|
||||
|
||||
@@ -55,11 +55,7 @@ class FromComposerDropDownWidget extends StatelessWidget {
|
||||
padding: FromComposerDropDownWidgetStyle.prefixPadding,
|
||||
child: Text(
|
||||
'${PrefixEmailAddress.from.asName(context)}:',
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColor.m3Tertiary,
|
||||
),
|
||||
style: FromComposerDropDownWidgetStyle.prefixLabelTextStyle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: FromComposerDropDownWidgetStyle.space),
|
||||
|
||||
Reference in New Issue
Block a user