From 88ef392d38d63f83131e6d05af1bfe17ac9226a8 Mon Sep 17 00:00:00 2001 From: HuyNguyen Date: Thu, 16 Mar 2023 22:42:57 +0700 Subject: [PATCH] TF-1548: Hide switch icon when list forward is empty (cherry picked from commit bb97b1cdd95a75e00191d11eff452817429a7a05) --- .../presentation/forward/forward_view.dart | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/features/manage_account/presentation/forward/forward_view.dart b/lib/features/manage_account/presentation/forward/forward_view.dart index c8e3f842f..980103b68 100644 --- a/lib/features/manage_account/presentation/forward/forward_view.dart +++ b/lib/features/manage_account/presentation/forward/forward_view.dart @@ -85,18 +85,20 @@ class ForwardView extends GetWidget with AppLoaderMixin { padding: SettingsUtils.getPaddingKeepLocalSwitchButtonForwarding(context, _responsiveUtils), child: Row(children: [ Obx(() { - return InkWell( - onTap: controller.handleEditLocalCopy, - child: SvgPicture.asset( - controller.currentForwardLocalCopyState - ? _imagePaths.icSwitchOn - : _imagePaths.icSwitchOff, - fit: BoxFit.fill, - width: 36, - height: 24) - ); + 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(); }), - const SizedBox(width: 16), Expanded( child: Text( AppLocalizations.of(context).keepLocalCopyForwardLabel,