SwiftUI @State var initialization issue : <p>I would like to initialise the value of an <code>@State</code> var in SwiftUI trough the <code>init()</code> method of a <code>Struct</code>, so it can take the proper text from a prepared dictionary for manipulation purposes in a TextField.
The source code looks like this:</p>

<pre><code>struct StateFromOutside: View {
    let list = [
        "a": "Letter A",
        "b": "Letter B",
        // ...
    ]
    @State var fullText: String = ""

    init(letter: String) {
        self.fullText = list[letter]!
    }

    var body: some View {
        TextField($fullText)
    }
}
</code></pre>

<p>Unfortunately the execution fails with the error <code>Thread 1: Fatal error: Accessing State&lt;String&gt; outside View.body</code></p>

<p>How can I resolve the situation? Thank you very much in advance!</p>
