title: Expanded widget in AppBar
body: <p>I have an app bar where I want to have the title and then next to it a raised button that expands to fill the remaining horizontal space. I tried variations of this:</p>
  <pre><code>AppBar(
    title: Row(
      children: [
        Text(&quot;Select view&quot;),
        // the row that follows is because it says Expanded widgets
        // should be put directly in Row or Column or Flex
        Padding(padding: EdgeInsets.only(left: 12.0), child: Row(children: [ 
          Expanded(child: RaisedButton(
            child: Text(&quot;view 1&quot;),
            onPressed: () {
              // something
            },
          ),),
        ])),
      ]
    ),
  );
  </code></pre>
  <p>For this I'm getting the following error:</p>
  <blockquote>
  <p>I/flutter (26477): The following assertion was thrown during performLayout():</p>
  <p>I/flutter (26477): The _ToolbarLayout custom multichild layout delegate forgot to lay out the following children:</p>
  <p>I/flutter (26477):   _ToolbarSlot.middle: RenderSemanticsAnnotations#6d937 NEEDS-LAYOUT NEEDS-PAINT</p>
  <p>I/flutter (26477):   _ToolbarSlot.middle: RenderSemanticsAnnotations#7fcd5 NEEDS-LAYOUT NEEDS-PAINT</p>
  <p>I/flutter (26477):   _ToolbarSlot.middle: RenderSemanticsAnnotations#f9a7a NEEDS-LAYOUT NEEDS-PAINT</p>
  <p>I/flutter (26477):   _ToolbarSlot.middle: RenderSemanticsAnnotations#ce1f2 NEEDS-LAYOUT NEEDS-PAINT</p>
  <p>I/flutter (26477): Each child must be laid out exactly once.</p>
  </blockquote>
  <p>Every other thing I tried was also throwing some assertion exception. I don't really care how I do it, I just want to have two widgets - the title and next to it a <code>RaisedButton</code> that fills the rest of the space in the app bar.</p>