title: Show transparent dialog in flutter
body: <p>I want to disply a image in flutter in an transparent dialog. I've set <code>opaque</code> to false and used <code>MaterialType.transparency</code>. When I open the dialog the background is black.</p>
  
  <pre><code>class ShowProfileImage extends ModalRoute&lt;void&gt; {
    final String url;
  
    @override
    Duration get transitionDuration =&gt; Duration(milliseconds: 500);
  
    @override
    bool get opaque =&gt; false;
  
    @override
    bool get barrierDismissible =&gt; false;
  
    @override
    Color get barrierColor =&gt; Colors.black;
  
    @override
    String get barrierLabel =&gt; null;
  
    @override
    bool get maintainState =&gt; true;
  
    VoidCallback onDeleteImage;
  
    ShowProfileImage(String this.url);
  
    @override
    Widget buildPage(
      BuildContext context,
      Animation&lt;double&gt; animation,
      Animation&lt;double&gt; secondaryAnimation,
    ) {
      // This makes sure that text and other content follows the material style
      return Material(
        type: MaterialType.transparency,
        // make sure that the overlay content is not cut off
        child: SafeArea(
          child: InkWell(
              onTap: () =&gt; Navigator.of(context).pop(),
              child: Container(
                  height: double.infinity,
                  width: double.infinity,
                  color: Colors.transparent,
                  child: Center(
                      child: Container(
                          width: 300,
                          child: Image(image: NetworkImageWithRetry(url)))))),
        ),
      );
    }
  }
  </code></pre>