extension View { /// `view.show(if: show)`: optional view @ViewBuilder func show(if show: Bool) -> some View { if show { self } } }
compare: .hideIf() - use .hidden()
Last updated 2 years ago