title: Conditionally wrap code inside view SwiftUI
body: <p>I want to make my code inside a scrollview based on a boolean</p>
  <p>Something like this :</p>
  <pre><code> ScrollView{
      
            Vstack {
                  
           }
           
             Hstack {
             
              }
      
      }.isWrapped(true)
  </code></pre>
  <p>So if the bool is true, the content is wrapped inside a ScrollView, if not, I just get the content as is. (without the scrollView parent)</p>
  <p>I tried with multiples way, the only thing I see as possible is 2 blocks of code, not good practice thought.</p>