From 9c672d483531d756a0412fe1a0258bdbc226eac9 Mon Sep 17 00:00:00 2001 From: HuyNguyen Date: Fri, 17 Mar 2023 10:07:08 +0700 Subject: [PATCH] TF-1548: Hide all text when list forward is empty (cherry picked from commit b931a94805167e6f53028e5677ef1f650bbf6ebf) --- .../presentation/forward/forward_view.dart | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/features/manage_account/presentation/forward/forward_view.dart b/lib/features/manage_account/presentation/forward/forward_view.dart index 980103b68..281300ae3 100644 --- a/lib/features/manage_account/presentation/forward/forward_view.dart +++ b/lib/features/manage_account/presentation/forward/forward_view.dart @@ -80,38 +80,38 @@ class ForwardView extends GetWidget with AppLoaderMixin { } Widget _buildKeepLocalSwitchButton(BuildContext context) { - return Container( - color: Colors.transparent, - padding: SettingsUtils.getPaddingKeepLocalSwitchButtonForwarding(context, _responsiveUtils), - child: Row(children: [ - Obx(() { - return controller.listRecipientForward.isNotEmpty - ? Padding( - padding: const EdgeInsets.only(right: 16), - child: InkWell( - onTap: controller.handleEditLocalCopy, - child: SvgPicture.asset( - controller.currentForwardLocalCopyState - ? _imagePaths.icSwitchOn - : _imagePaths.icSwitchOff, - fit: BoxFit.fill, - width: 36, - height: 24))) - : const SizedBox(); - }), - Expanded( - child: Text( - AppLocalizations.of(context).keepLocalCopyForwardLabel, - overflow: CommonTextStyle.defaultTextOverFlow, - softWrap: CommonTextStyle.defaultSoftWrap, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Colors.black) - ), - ) - ]), - ); + return Obx(() { + return controller.listRecipientForward.isNotEmpty + ? Container( + color: Colors.transparent, + padding: SettingsUtils.getPaddingKeepLocalSwitchButtonForwarding(context, _responsiveUtils), + child: Row(children: [ + Padding( + padding: const EdgeInsets.only(right: 16), + child: InkWell( + onTap: controller.handleEditLocalCopy, + child: SvgPicture.asset( + controller.currentForwardLocalCopyState + ? _imagePaths.icSwitchOn + : _imagePaths.icSwitchOff, + fit: BoxFit.fill, + width: 36, + height: 24))), + Expanded( + child: Text( + AppLocalizations.of(context).keepLocalCopyForwardLabel, + overflow: CommonTextStyle.defaultTextOverFlow, + softWrap: CommonTextStyle.defaultSoftWrap, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.black) + ), + ) + ])) + : const SizedBox(); + }); + } Widget _buildLoadingView() {