How do I make the Navigation Drawer of my Flutter app transparent?

Question

Asked by Lebogang N on September 28, 2018 (source).

I have built a native Android App which has a transparent navigation drawer. I have been asked to build the same app using Flutter and I have gotten to the point where I would like to implement a transparent navigation drawer. How do I make the Navigation Drawer of my Flutter app transparent because I have been struggling on that end ? I have already tried

drawer: Drawer(
          child: Container(
            color: Colors.transparent,)),

The navigation drawer just remains white. I have been searching for a solution to this and cant find one. Any help would be appreciated. I have attached images of the Native App with a transparent drawer and the Flutter version with a white Navigation drawer

Native

Flutter

Answer

Question answered by iRedia E (source).

I think there's a better way of doing this without messing up the entire canvases on the app. Since you want it specifically for the drawer, try this approach.

Scaffold(
   drawer: Theme(
      data: Theme.of(context).copyWith(
       // Set the transparency here
       canvasColor: Colors.transparent, //or any other color you want. e.g Colors.blue.withOpacity(0.5)
      ),
      child: Drawer(
          // All other codes goes here. 
       )
    )
 );
ANDROID-STUDIO DART FLUTTER
SHARE: