title: Flutter FutureBuilder refresh when TextField value changes
body: <p>The <code>_futureData</code> is to used for the <code>FutureBuilder</code> after retrieving value from the <code>_loadPhobias()</code> function.</p>
  <p><strong>entry_screen.dart</strong></p>
  <pre class="lang-dart prettyprint-override"><code>Future _futureData;
  final TextEditingController _textEditingController = TextEditingController();
  </code></pre>
  <p><code>_loadPhobias()</code> function does not seem to have any problem.</p>
  <p><strong>entry_screen.dart</strong></p>
  <pre class="lang-dart prettyprint-override"><code>Future&lt;List&lt;String&gt;&gt; _loadPhobias() async =&gt;
      await rootBundle.loadString('assets/phobias.txt').then((phobias) {
      List _listOfAllPhobias = [];
      List&lt;String&gt; _listOfSortedPhobias = [];
      _textEditingController.addListener(() {
        ...
      }); 
      return _listOfSortedPhobias;
  });
  
  @override
  void initState() {
  super.initState();
      _futureData = _loadPhobias();
  }
  
  @override
  Widget build(BuildContext context) {
      return Scaffold(
      appBar: AppBar(
      title: TextField(
          // When the value is changed, the value returned from the _loadPhobias will also change. So I want the FutureBuilder to be rebuilt.
          onChanged: (text) { setState(() =&gt; _futureData =  _loadPhobias()) },
          ),
      ),
      body: FutureBuilder(
          future: _futureData,
          builder: (context, snapshot) {
              return snapshot.hasData
                  ? ListView.builder(
                      itemCount: snapshot.data.length,
                      itemBuilder: (context, index) =&gt; Column(
                              children: &lt;Widget&gt;[
                                  PhobiasCard(sentence: snapshot.data[index]),
                              )
                          ],
                      ))
                      : Center(
                          child: CircularProgressIndicator(),
                      );
                  },
              ),
          ),
      );
  }
  </code></pre>
  <p>This is the error that I got:</p>
  <blockquote>
  <p>FlutterError (setState() callback argument returned a Future.</p>
  <p>The setState() method on _EntryScreenState#51168 was called with a closure or method that returned a Future. Maybe it is marked as &quot;async&quot;.</p>
  <p>Instead of performing asynchronous work inside a call to setState(), first execute the work (without updating the widget state), and then synchronously update the state inside a call to setState().)</p>
  </blockquote>