From e676c57251dee452e69c33a71cab6614ceb2dcf2 Mon Sep 17 00:00:00 2001 From: DatDang Date: Wed, 8 Jan 2025 10:14:24 +0700 Subject: [PATCH] TF-3407 Enable SelectableText for email display name in EmailAddressDialogBuilder --- .../widgets/email_address_bottom_sheet_builder.dart | 11 +++++------ .../widgets/email_address_dialog_builder.dart | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/features/email/presentation/widgets/email_address_bottom_sheet_builder.dart b/lib/features/email/presentation/widgets/email_address_bottom_sheet_builder.dart index 90200464aa..5ed4ffe2ac 100644 --- a/lib/features/email/presentation/widgets/email_address_bottom_sheet_builder.dart +++ b/lib/features/email/presentation/widgets/email_address_bottom_sheet_builder.dart @@ -99,16 +99,15 @@ class EmailAddressBottomSheetBuilder { left: 16, right: 16, top: 16), - child: Text( + child: SelectableText( _emailAddress.displayName, textAlign: TextAlign.center, - overflow: CommonTextStyle.defaultTextOverFlow, - softWrap: CommonTextStyle.defaultSoftWrap, maxLines: 2, style: const TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - color: AppColor.colorNameEmail), + overflow: CommonTextStyle.defaultTextOverFlow, + fontSize: 20, + fontWeight: FontWeight.w600, + color: AppColor.colorNameEmail), )), Material( color: Colors.transparent, diff --git a/lib/features/email/presentation/widgets/email_address_dialog_builder.dart b/lib/features/email/presentation/widgets/email_address_dialog_builder.dart index 7f146e625d..7356c4abab 100644 --- a/lib/features/email/presentation/widgets/email_address_dialog_builder.dart +++ b/lib/features/email/presentation/widgets/email_address_dialog_builder.dart @@ -75,16 +75,15 @@ class EmailAddressDialogBuilder extends StatelessWidget { left: 16, right: 16, top: 16), - child: Center(child: Text( + child: Center(child: SelectableText( _emailAddress.displayName, textAlign: TextAlign.center, maxLines: 2, - overflow: CommonTextStyle.defaultTextOverFlow, - softWrap: CommonTextStyle.defaultSoftWrap, style: const TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - color: AppColor.colorNameEmail), + overflow: CommonTextStyle.defaultTextOverFlow, + fontSize: 20, + fontWeight: FontWeight.w600, + color: AppColor.colorNameEmail), )) ), Material(