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,13 +80,13 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
} }
Widget _buildKeepLocalSwitchButton(BuildContext context) { Widget _buildKeepLocalSwitchButton(BuildContext context) {
return Container( return Obx(() {
return controller.listRecipientForward.isNotEmpty
? Container(
color: Colors.transparent, color: Colors.transparent,
padding: SettingsUtils.getPaddingKeepLocalSwitchButtonForwarding(context, _responsiveUtils), padding: SettingsUtils.getPaddingKeepLocalSwitchButtonForwarding(context, _responsiveUtils),
child: Row(children: [ child: Row(children: [
Obx(() { Padding(
return controller.listRecipientForward.isNotEmpty
? Padding(
padding: const EdgeInsets.only(right: 16), padding: const EdgeInsets.only(right: 16),
child: InkWell( child: InkWell(
onTap: controller.handleEditLocalCopy, onTap: controller.handleEditLocalCopy,
@@ -96,9 +96,7 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
: _imagePaths.icSwitchOff, : _imagePaths.icSwitchOff,
fit: BoxFit.fill, fit: BoxFit.fill,
width: 36, width: 36,
height: 24))) height: 24))),
: const SizedBox();
}),
Expanded( Expanded(
child: Text( child: Text(
AppLocalizations.of(context).keepLocalCopyForwardLabel, AppLocalizations.of(context).keepLocalCopyForwardLabel,
@@ -110,8 +108,10 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
color: Colors.black) color: Colors.black)
), ),
) )
]), ]))
); : const SizedBox();
});
} }
Widget _buildLoadingView() { Widget _buildLoadingView() {