title: How to convert a boolean expression to Binding<Bool> in SwiftUI?
body: <p>I have a textfield, and I am trying to goto another view when user input a specific string.</p>
  <pre><code>import SwiftUI
  
  struct ContentView: View {
      @State var whether_go = &quot;No&quot;
      var body: some View {
                      TextField(&quot;Goto?&quot;, text: $whether_go)
                          .navigate(to: CircleImage(), when: whether_go == &quot;Yes&quot;)
      }
  }
  </code></pre>
  <p>This will raise error: <code>Cannot convert value of type 'Bool' to expected argument type 'Binding&lt;Bool&gt;'</code> Because <code>when</code> argument need a Binding&lt;Bool&gt;</p>
  <p>I tried to use</p>
  <pre><code>when: Binding&lt;Bool&gt;(get: whether_happy == &quot;Yes&quot;))
  </code></pre>
  <p>This raise another error: <code>No exact matches in call to initializer.</code></p>
  <p>So what should I do to convert a boolean to Binding&lt;Bool&gt;?</p>