TF-1548: Hide all text when list forward is empty

(cherry picked from commit b931a94805167e6f53028e5677ef1f650bbf6ebf)
This commit is contained in:
HuyNguyen
2023-03-17 10:07:08 +07:00
committed by Dat Vu
parent 88ef392d38
commit 9c672d4835
@@ -80,38 +80,38 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
} }
Widget _buildKeepLocalSwitchButton(BuildContext context) { Widget _buildKeepLocalSwitchButton(BuildContext context) {
return Container( return Obx(() {
color: Colors.transparent, return controller.listRecipientForward.isNotEmpty
padding: SettingsUtils.getPaddingKeepLocalSwitchButtonForwarding(context, _responsiveUtils), ? Container(
child: Row(children: [ color: Colors.transparent,
Obx(() { padding: SettingsUtils.getPaddingKeepLocalSwitchButtonForwarding(context, _responsiveUtils),
return controller.listRecipientForward.isNotEmpty child: Row(children: [
? Padding( Padding(
padding: const EdgeInsets.only(right: 16), padding: const EdgeInsets.only(right: 16),
child: InkWell( child: InkWell(
onTap: controller.handleEditLocalCopy, onTap: controller.handleEditLocalCopy,
child: SvgPicture.asset( child: SvgPicture.asset(
controller.currentForwardLocalCopyState controller.currentForwardLocalCopyState
? _imagePaths.icSwitchOn ? _imagePaths.icSwitchOn
: _imagePaths.icSwitchOff, : _imagePaths.icSwitchOff,
fit: BoxFit.fill, fit: BoxFit.fill,
width: 36, width: 36,
height: 24))) height: 24))),
: const SizedBox(); Expanded(
}), child: Text(
Expanded( AppLocalizations.of(context).keepLocalCopyForwardLabel,
child: Text( overflow: CommonTextStyle.defaultTextOverFlow,
AppLocalizations.of(context).keepLocalCopyForwardLabel, softWrap: CommonTextStyle.defaultSoftWrap,
overflow: CommonTextStyle.defaultTextOverFlow, style: const TextStyle(
softWrap: CommonTextStyle.defaultSoftWrap, fontSize: 16,
style: const TextStyle( fontWeight: FontWeight.w500,
fontSize: 16, color: Colors.black)
fontWeight: FontWeight.w500, ),
color: Colors.black) )
), ]))
) : const SizedBox();
]), });
);
} }
Widget _buildLoadingView() { Widget _buildLoadingView() {