title: ExpansionTile within an IconButton in AppBar flutter
body: <p>I'm trying to build a collapse view after clicking an <code>IconButton</code> on my <code>AppBar</code> widget, I used <code>ExpansionTile</code> but nothing happens after I clicked the <code>IconButton</code>.</p>
  <pre><code>     appBar: AppBar(
            actions: &lt;Widget&gt;[
             
            IconButton(
              onPressed: () {
    
              ExpansionTile(
                title: Text(
                  &quot;Settings&quot;,
                  style: TextStyle(
                    fontSize: 18.0,
                    fontWeight: FontWeight.bold
                  ),
                ),
              );
  
              },
              icon: Icon(Icons.settings),
            ),
            
          ],
      ),
  </code></pre>
  <p>Did I write the code right, or should I consider refactoring it. Thanks in advance!</p>