title: How do i disable Container childs to expand?
body: <p>So i got a Container in a Scaffold (Material). But if i add a ElevatedButton as a child of this Container the ElevatedButton the Button Expands to the full size of the parent Container. How can i avoid it?</p>
  <p>I don't know whether it's the fault of flutter installation or if it's on me.</p>
  <p>Here's the code.</p>
  <pre><code>
  class Login extends StatefulWidget {
    const Login({Key? key}) : super(key: key);
  
    @override
    _LoginState createState() =&gt; _LoginState();
  }
  
  class _LoginState extends State&lt;Login&gt; {
    String status = &quot;Status: OK&quot;;
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        backgroundColor: Colors.teal,
        appBar: AppBar(
          backgroundColor: Colors.teal,
          elevation: 0,
          centerTitle: true,
          automaticallyImplyLeading: false,
          title: Text(status),
        ),
        body: Center(
          child: Column(
            children: [
              SubmitContainer(),
            ],
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
          ),
        ),
      );
    }
  }
  
  class InputContainer extends StatelessWidget {
    const InputContainer({Key? key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return Container(
        child: TextField(),
        width: 200,
        height: 200,
        color: Colors.yellow,
      );
    }
  }
  
  class SubmitContainer extends StatelessWidget {
    const SubmitContainer({Key? key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return Container(
        child: SizedBox(
          child: ElevatedButton(
            child: Text(&quot;GO&quot;),
            onPressed: () {},
          ),
          width: 300,
          height: 50,
        ),
        width: MediaQuery.of(context).size.width,
      );
    }
  }
  </code></pre>
  <p>And the endresult looks like this:
  <a href="https://i.stack.imgur.com/Kf1ey.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kf1ey.png" alt="Google Pixel 3a XL API 23" /></a></p>