TF-1548: Hide switch icon when list forward is empty

(cherry picked from commit bb97b1cdd95a75e00191d11eff452817429a7a05)
This commit is contained in:
HuyNguyen
2023-03-16 22:42:57 +07:00
committed by Dat Vu
parent c522a93fb0
commit 88ef392d38
@@ -85,18 +85,20 @@ class ForwardView extends GetWidget<ForwardController> 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,