Remove or modify navigation drawer overlay shadow in Flutter - flutter

I created a Scaffold widget with appBar and drawer.
As I open the drawer, there is a shadow over the Scaffold's body widget. I'd like to either remove the shadow, make it not so "strong" or change the shade slightly.
I checked the docs and I didn't find any way to achieve this through public API.
Is there any way to remove the drawer menu's "drop shadow" on the body?
The elevation option is something different, even if I set it to 0, the overlay shadow on top of the body is still present.
This issue's description's screenshots might help clarify what I want.

If you want to get rid of the shadow over the Scaffold body then you have to change the Scaffold's drawerScrimColor's value to Colors.transparent.

Have you tried setting the drawer's elevation to elevation: 0.0?

check this
drawerTheme:
DrawerThemeData(scrimColor: Colors.transparent, elevation: 0.5),

Related

Flutter: shadow color of the drawer

I want to use Drawer.
When the Drawer unfolds - as you can see in the video in the link - the background or the rest of window is shadowed to let the user focus on the drawer.
I feel that the shadow is very dark, is there any way to change the color of the shadow?
The documentation for the Drawer class lists several parameters such as shadowColor but it seems to be outdated since the Drawer class only takes the parameter
this.backgroundColor,
this.elevation,
this.shape,
this.width,
this.child,
this.semanticLabel,
Any idea or trick?
Changing the overlay color of the Drawer doesn't have to do with the Drawer, but rather the Scaffold itself. You need to set drawerScrimColor to transparent:
The color to use for the scrim that obscures primary content while a drawer is open.
Scaffold(
drawerScrimColor: Colors.transparent,

How can I disable background widgets in flutter

What I want to achieve is like when you use the alert dialog widget :
When the dialog box shows everything in the background is darkened and disabled. I want to do that but I don't want to use a dialogbox , I have a Container that slides from the bottom of the screen, it's inside a Stack widget.
How can I achieve this?
Wrap your widget with Scaffold and set the backgroundColor to
// change the color as you like
backgroundColor: Colors.black.withOpacity(0.3),

Should I always use a SafeArea at the top level of my flutter screens?

I am curious if I should always use a SafeArea widget at the top level of my screen. I mean....when would I want my content blocked by things like a notch? For me it seems like the answer is never.
So should I not just use SafeArea on every page? If so, should it be above or below the Scaffold widget?
You don't have to use SafeArea on every screen. It actually depends if an AppBar is used or not, because the AppBar automatically calculates the values and adds the required padding.
If you use it above a Scaffold the area where the padding is applied would be black. On the other hand, if you use it below the Scaffold the color of the area would depend on the app theme, probably the Scaffold background color.
If you won't add an app bar or add it. if you want to adjust the screen to be responsive using MediaQuery and you don't need any scroll inside the screen use it.
Use it as the first widget in the body of the scaffold.

Flutter Background behind an Element when you press/press hold something like a button

I do not know how it is called but I want to remove what you see on the picture (the darker grey part). I want that the grey square outline disappears when I click on something.
https://i.stack.imgur.com/1iJUP.jpg
https://i.stack.imgur.com/hj0ny.gif
In general..it is the splash color..
For ex: if we consider RaisedButton
you can do something like this..
RaisedButton(
spashColor: Colors.green, //your desired color
child: Text("hello"),
)
You can do the same for FlatButton also..
If you don't want any color..then you can set it to "Colors.transparent"
Given that you state the widget seen in the image is a BottomNavigationBar, you can set the background color via the backgroundColor attribute.
You can set this attribute to the desirer color or a transparency (which would reveal the underlying scaffold color instead)
However, if the widget in question turns out to be a shifting background navigation bar the background color of the inner item's will overwite that. In which case you would instead need to set the background color of the specific item.
Source : https://api.flutter.dev/flutter/material/BottomNavigationBar/backgroundColor.html

How do I achieve this BottomSheet customization like this?

How do I make BottomSheet like this in Flutter? Specifically the boldge where arrow is?
It can be solved by setting the background color of showModalBottomSheet, transparent
backgroundColor: Colors.transparent,and use a cliper or rounded shape in it.