From e145ecfbf6ad571933bd871ac1edc7d2b81c99e1 Mon Sep 17 00:00:00 2001 From: HuyNguyen Date: Thu, 6 Apr 2023 23:46:40 +0700 Subject: [PATCH] TF-1685: Fix hover and click to button show all or hide attachments (cherry picked from commit 248eb28f678d1b4648f459cb864fc77da15ea4bd) --- .../presentation/composer_view_web.dart | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/features/composer/presentation/composer_view_web.dart b/lib/features/composer/presentation/composer_view_web.dart index 239c22dae..759a6c03a 100644 --- a/lib/features/composer/presentation/composer_view_web.dart +++ b/lib/features/composer/presentation/composer_view_web.dart @@ -846,20 +846,20 @@ class ComposerView extends GetWidget return Row( children: [ Text( - '${AppLocalizations.of(context).attachments} (${filesize(uploadFilesState.totalSize, 0)}):', - style: const TextStyle(fontSize: 12, color: AppColor.colorHintEmailAddressInput, fontWeight: FontWeight.normal)), + '${AppLocalizations.of(context).attachments} (${filesize(uploadFilesState.totalSize, 0)}):', + style: const TextStyle(fontSize: 12, color: AppColor.colorHintEmailAddressInput, fontWeight: FontWeight.normal)), const Spacer(), - Material( + TextButton( + onPressed: () => controller.toggleDisplayAttachments(), + child: Material( type: MaterialType.circle, color: Colors.transparent, - child: TextButton( - child: Text( - expandModeAttachment == ExpandMode.EXPAND - ? AppLocalizations.of(context).hide - : '${AppLocalizations.of(context).showAll} (${uploadFilesState.length})', - style: const TextStyle(fontWeight: FontWeight.w500, fontSize: 12, color: AppColor.colorTextButton)), - onPressed: () => controller.toggleDisplayAttachments() - ) + child: Text( + expandModeAttachment == ExpandMode.EXPAND + ? AppLocalizations.of(context).hide + : '${AppLocalizations.of(context).showAll} (${uploadFilesState.length})', + style: const TextStyle(fontWeight: FontWeight.w500, fontSize: 12, color: AppColor.colorTextButton)) + ), ) ], );