I want to dim (gray) the background when the bottom sheet opens, like a modal bottom sheet, but still be able to interact with the rest of the UI while the bottom sheet is open - like a regular bottom sheet. Any ideas?
CodePudding user response:
Even though, I won't recommend creating such an effect as it is not very understandable from the user perspective.
You can achieve this by using the IgnorePointer, Stack and setState((){})
1- Add a field bool showOverlay = false;
2- Align some Container to with Alignment.bottom to represent ur bottom sheet
3- Put some overlay Container with some background color and opacity and wrap it with IgnorePointer(ignoring: true, ...) which will let it not interfere with your widgets below.
I think you got it from here.
