title: How to shrink and expand a Wrap widget in Flutter?
body: <p>I would like to shrink and expand my Wrap widget when the size of the parent Container is increased or decreased.  The fonts of the individual children should increase or decrease along with the size of the boxes.  What is the best way to achieve this?</p>
  
  <p>I have tried FittedBox (scaledDown) which reduces the sizes but then widget doesn't wrap at all (!) and all the children remain on one line.</p>
  
  <p>This is the default behavious (if the Wrap widget is defined in a Container with a specific size).
  <a href="https://i.stack.imgur.com/9VTzR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9VTzR.png" alt="enter image description here"></a></p>
  
  <p><em>Here is the code...</em></p>
  
  <pre><code>  Widget _build(BuildContext context) {
      var words = ["a", "abc", "de", "ef", "g", "i", "is", "s", "th"];
  
      return new Scaffold(
        body: Column(children: &lt;Widget&gt;[
          Text('height 100'),
          Container(
            color: Colors.red,
            height: 100.0,
            child: Wrap(
              alignment: WrapAlignment.spaceEvenly,
              children: _buildWordButtons(words),
            ),
          ),
          Text('height 50'),
          Container(
            color: Colors.green,
            height: 50.0,
            child: Wrap(
              alignment: WrapAlignment.spaceEvenly,
              children: _buildWordButtons(words),
            ),
          ),
          Text('FittedBox, scaleDown, height 200'),
          Container(
            color: Colors.blue,
            height: 200.0,
            child: FittedBox(
              fit: BoxFit.scaleDown,
              child: Wrap(
                alignment: WrapAlignment.spaceEvenly,
                children: _buildWordButtons(words),
              ),
            ),
          ),
        ]),
      );
    }
  
    List&lt;Widget&gt; _buildWordButtons(List&lt;String&gt; words) {
      var buttons = List&lt;Widget&gt;();
  
      for (var word in words) {
        buttons.add(Container(
          decoration: new BoxDecoration(border: new Border.all(color: Colors.black)),
          child: Text(
            word,
            style: TextStyle(fontSize: 50.0),
          ),
          margin: EdgeInsets.all(5.0),
        ));
      }
  
      return buttons;
    }
  </code></pre>