title: Flutter container width inside MaterialButton
body: <p>I am trying for hours to set my container width to its parent, which is a MaterialButton. I want the container to fill the entire width of the MaterialButton.</p>
  <p>I tried to set the container width to &quot;double.infitiy&quot; or to &quot;MediaQuery.of(context).size.width&quot;. Also played with &quot;Expanded&quot; etc. None of it worked. Not sure what I am doing wrong, thanks.</p>
  <pre><code>@override
    Widget build(BuildContext context) {
      return Material(
        **child: MaterialButton(
          minWidth: MediaQuery.of(context).size.width,
          onPressed: onPressed,
          child: Container(
            width: double.infinity,**
            margin: EdgeInsets.all(8.0),
            padding: EdgeInsets.all(8.0),
            decoration: BoxDecoration(
                color: Colors.greenAccent,
                borderRadius: BorderRadius.circular(10.0)),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Text(text),
                SizedBox(
                  height: 8.0,
                ),
                SvgPicture.asset(
                  'images/medaillen.svg',
                  width: 80,
                ),
                SizedBox(
                  height: 15.0,
                ),
                Text(
                  textTopThree,
                  maxLines: 3,
                ),
              ],
            ),
          ),
        ),
      );
  </code></pre>