title: Show snackbar when item is tapped in bottom sheet
body: <p>I want to show <code>Snackbar</code> when an item is clicked in the bottom sheet. I tried this. </p>
  
  <pre><code>@override
  Widget build(BuildContext defaultContext) {
    return Scaffold(
      body: Center(
        child: RaisedButton(
          onPressed: () =&gt; showModalBottomSheet(
                context: defaultContext,
                builder: (BuildContext context) {
                  return Builder(
                    builder: (BuildContext builderContext) {
                      return ListTile(
                        title: Text("Click me"),
                        onTap: () {
                          Navigator.pop(builderContext); // hiding bottom sheet
                          Scaffold.of(builderContext).showSnackBar(SnackBar(content: Text("Hi")));
                        },
                      );
                    },
                  );
                },
              ),
        ),
      ),
    );
  }
  </code></pre>
  
  <p>But I am having error</p>
  
  <blockquote>
    <p>Scaffold.of() called with a context that does not contain a Scaffold</p>
  </blockquote>
  
  <p><strong>Note</strong> The question is not a duplicate of <a href="https://stackoverflow.com/questions/51304568/scaffold-of-called-with-a-context-that-does-not-contain-a-scaffold/51304732">this</a></p>
  
  <p>PS: I know I can use <code>GlobalKey</code> in <code>Scaffold</code> to show the <code>Snackbar</code> but I want to do it using <code>Builder</code> like the <a href="https://docs.flutter.io/flutter/material/Scaffold/of.html" rel="nofollow noreferrer">docs suggest</a> to use <code>Builder</code>. I did use builder and it didn't work.</p>