Modal bottom sheet on flutter with interactive background - flutter

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?

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.

Related

Flutter: Custom pain on bottom of the page with TextField

I am trying to create a user interface with a custom paint on the bottom and with two text fields on the bottom too.
The problem is when the keyboard is shown, the TextFormFields go up while the bottom paint does not go anywhere.
You can see what I mean in the pictures below:
Any ideas about what goes wrong?

Beautiful and responsive "dropdown menu" / "pop-up" flutter

Please see the photos attached for the feature, or simply head to https://www.chrislorenzomusic.com and resize the window until you see the dropdown menu in top right corner appears and click on the menu to see the effect.
I'm not sure what this effect or feature is called, but was wondering what it's called and if it was possible to make something similar in flutter?
Before resizing the window
After resizing window the menu at top right corner appears
When clicking on the menu
When an app or widget behaves differently depending on the screen size or orientation it is considered responsive or has a responsive layout.
https://docs.flutter.dev/development/ui/layout/adaptive-responsive
The Menu itself can be created using a Scaffold with an AppBar and a Drawer. You can configure the AppBar to have the menu icon or the links depending on the size using LayoutBuilder and MediaQuery.of.
AppBar
https://material.io/components/app-bars-top
Drawer
https://material.io/components/navigation-drawer

Is there a way to add shadow behind the app bar action buttons in Flutter?

I am using SliverAppBar widget with some background image behind it. Since the image I will load will be dynamic, sometimes it can have light colors and can cause the back button (or any other action button) to be hardly visible.
As you can see in the screenshot below, I gave a little shadow to the app bar title using TextStyle & Shadow widgets, so it is much more visible than the back button.
You can try use "elevation" here is the Flutter link for more clarification: https://www.google.com/url?sa=t&source=web&rct=j&url=https://api.flutter.dev/flutter/material/SliverAppBar/elevation.html&ved=2ahUKEwiEpfiIn4TwAhWUH7cAHY9ECIwQFjACegQIBRAC&usg=AOvVaw0wCdyaVv3EA8ulVXXvaVMu

How can I attach bottom bar to top of bottom sheet?

I have a bottom container with a progress bar in it, and when i click or swipe up i need it to follow the bottom sheet as a header.
Can I attach it to the bottom sheet or can I implement it in the sheet itself and then have the sheet peek up by some offset?
I've watched all guides, tutorials and flutter demos of the first few google pages and I cant seam to find any information about it.
Please provide me some guidance so I can flutter in the right direction.
This effect can be achieved using some basic widget building.
StackView
Container: background overlay
Column: MainAxisSize.max
Container: height = (screenHeight - bottomBarHeight)
BottomBar: fixes size
Container: Bottom Dialog
Create a fullscreen stateful widget with a fixed size using MediaQuery.size.height. When tapped animate the Column up to distance you want this to go, most likely the height of the Bottom Dialog Container.
Animating the y property of the Column should get this to work fine.

Flutter overlay is moving

I'm asking how to disable Overlays to move when a Scaffold.of(context).showSnackBar is called like on my video below.
The same thing is happening when the keyboard appear. Sometime the blue floattingButton (+) don't come back to it's original position :-(
Thx in advance.
Problem animation
The FloatingActionButton going up when the Scaffold is displayed is something common to all default implementations.
Give a look to the "Bootom app bar" demo in the Gallery app. Press on the search button and you will see it coming up. Or just add a Scaffold to the app that is built with flutter create command.
This happens because of the way the FAB button is placed on the screen and the effect of displaying the Snackbar by the Scaffold.
The FAB button is displayed at the bottom of the content area of the Scaffold content. When the content area is shrinked to include the BottomAppBar, the FAB goes up with it. It has nothing to do with Overlay.
You have two options:
Either you create your own versiĆ³n of the FAB which is not
controlled by the Scaffold.
Or you hack the Scaffold so the size of the SnackBar is not taken
into account.
For this second option you can try the following:
Go to the file /lib/src/material/scaffold.dart in your flutter installation and look for the line with the code snackBarSize: snackBarSize, inside the _ScaffoldLayout class.
Replace it with snackBarSize: Size(0.0, 0.0),
You will see that the FAB stays in its place.