title: Why is the showModalBottomSheet() function not working
body: <p>Why is this code not working and the bottom sheet is not getting displayed. I've also retried running the code and still it doesn't work. I want to show a modal bottom sheet in flutter on a button click.</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatefulWidget {
    @override
    _MyAppState createState() =&gt; _MyAppState();
  }
  
  class _MyAppState extends State&lt;MyApp&gt; {
    void startInputAction(BuildContext context) {
      showModalBottomSheet(
        context: context,
        builder: (_) {
          return Container(
            height: 200,
            padding: EdgeInsets.all(10),
            child: Text("Something"),
          );
        },
      );
    }
  
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: Scaffold(
          appBar: AppBar(
            title: Text("Error Practice Bottom Sheet"),
            backgroundColor: Colors.purple,
          ),
          body: SingleChildScrollView(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: &lt;Widget&gt;[
                RaisedButton(
                  color: Colors.purple,
                  padding: EdgeInsets.all(20),
                  child: Text("Click here"),
                  onPressed: () =&gt; startInputAction(context),
                )
              ],
            ),
          ),
        ),
      );
    }
  }
  </code></pre>