title: Flutter Set State onPressed on RaisedButton
body: <p>I am building a quiz app which reveals the explanation for the correct answer after the user submits their chosen answer.</p>
  
  <p>There are two buttons on the layout -- "Next Question" &amp; "Submit Answer."</p>
  
  <p>In the initial state, the "Next Question" button is subtle as it is not clickable and only the "Submit Answer" buttons is clickable.</p>
  
  <p><a href="https://i.stack.imgur.com/xTPiO.jpg" rel="nofollow noreferrer">Click Here to View the Layout of the Initial State</a></p>
  
  <p>When the "Submit Answer" button is clicked, two actions should happen: <br/>
  1. The "Submit Answer" button then becomes subtle and not clickable and the "Next Question" button becomes bold and vibrant and, of course, clickable. <br/>
  2. Also, below the row of the two buttons, an additional section appears (another container maybe, i don't know) revealing the explanation for the correct answer.</p>
  
  <p>I'd like some help in implementing the above two actions</p>
  
  <p>So far, this is the code that I have:</p>
  
  <pre><code>Widget nextQuestion = new RaisedButton(
    padding: const EdgeInsets.all(10.0),
    child: const Text('Next Question'),
    color: Color(0xFFE9E9E9),
    elevation: 0.0,
    onPressed: () {
      null;
    },
  );
  
  Widget submitAnswer = new RaisedButton(
    padding: const EdgeInsets.all(10.0),
    child: const Text('Submit Answer'),
    color: Color(0xFFE08284),
    elevation: 5.0,
    onPressed: () {
      null;
    },
  );
  
  return Scaffold(
    body: new CustomScrollView(
      slivers: &lt;Widget&gt;[
        new SliverPadding(
          padding: new EdgeInsets.all(0.0),
          sliver: new SliverList(
            delegate: new SliverChildListDelegate([
              new Row(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  mainAxisSize: MainAxisSize.min,
                  children: &lt;Widget&gt;[nextQuestion, submitAnswer]),
              new SizedBox(height: 50.0),
            ]),
          ),
        ),
      ],
    ),
  );
  </code></pre>
  
  <p></p>