Reputation: 1296
Is it possible o change the color or transparency of the drawer's scrim in flutter? Something like is Java's drawerLayout.setScrimColor(Color.TRANSPARENT);
?
Thanks.
Upvotes: 1
Views: 2172
Reputation: 447
You can change drawerTheme like this:
return ThemeData(
drawerTheme: DrawerThemeData(
scrimColor: Colors.transparent,
),
);
Upvotes: 0
Reputation: 378
Following the same ideia brought by @diegoveloper and for that who might wonder how to make transparency just use the transparent color drawerScrimColor: Colors.transparent
https://api.flutter.dev/flutter/material/Colors/transparent-constant.html
Upvotes: 0
Reputation: 3539
Flutter now includes a drawerScrimColor
parameter in the Scaffold widget.
For example:
Scaffold(
drawerScrimColor: Colors.black,
);
Although I answered the question, @diegoveloper deserves the credit for submitting the PR
Upvotes: 2