title: How to listen for state changes inside a FutureBuilder widget and reflect the state change?
body: <p>to demonstrate the problem, let me write down some code for a <code>FutureBuilder</code>.</p>
  <pre><code>FutureBuilder(future: _myFuture, builder: (context, snapshot) {
      if(snapshot.hasData) {
  
          // !!!! IMPORTANT !!!
          // Pay attention to the _isFirstText variable below  
  
          return SizedBox(
                   child: _isFirstText ? Text(snapshot.data.firstText) : Text(snapshot.data.secondText),
                 );  
      }
   
      if(snapshot.connectionState == ConnectionState.isWaiting) {
          return Text('Waiting!');
      }
   
      return Text('Error');
  }),  
  </code></pre>
  <p>As I have mentioned in a comment in the above code, pay attention to the <code>_isFirstText</code> variable. Suppose that is a state variable. <strong>Inside the future builder, how do I get the correct return value that corresponds to the <code>isFirstText</code> state variable change.</strong></p>
  <p>I also came across <a href="https://stackoverflow.com/questions/67208739/how-to-change-the-state-inside-futurebuilder">this stack overflow post</a> but could not get the code to work.<br />
  I also came across a widget called <code>StatefulBuilder</code>, but I can not figure out to where in my <code>FutureBuilder</code> I should use it.</p>
  <p>Can someone please help?</p>