Using AlertDialog on a stack widget in flutter - flutter

I have a basic layout where I am using a stack widget to hold my other widgets.. I have a side toolbar, inside that I have a pen menu on click of which a popup should appear. When i am clicking the pen menu an alert dialog appears but not in the expected place, what i mean is...
I am expecting a dialog like the one in the below image. Do I need to use any plugin to create a dialog like this with a chevron mark?enter image description here

As you are using Alert dialog, it will by default be aligned in center of your screen. In order to achieve what you are trying to, I would suggest using a plugin like this.

Related

Show info text after clicking an Icon

I am trying to implement a feature in Flutter in which user will be able to display additional information after clicking on the specific icon or image. I would like to display a small annotation above selected icon. The example of what i would like to achive is in the screen below.
Is there any ready to use widget for this feature?
you can use Tooltip widget for this as bellow
Tooltip(
message: "This is the tool tip",
child: Icon(Icons.add),
),
when you long press on the icon the message will be shown like this.
You can do this by using Stack. Place the Button first where you want the Stack to be.
You can write the information you want to put on top of the button in Positioned() inside the Stack.
Set a variable, show information when this variable is True otherwise hide it.
You can also use GestureDedector if you want it to close when you touch anywhere.

Custom widget dropdown

If I do not click:
When I press the button in the red circle:
Hello, I want to ask. What widget can I use to get a design like this? When the red circle is pressed, another menu will appear and can be pressed to go to another menu. I tried using the dropdown button but it doesn't work as I want. I have also used ListTileTheme and ExpansionTile but it still doesn't work as I want. Anyone can share an opinion.
Flutter's core dropdown widget works almost exactly like your example, and there is a widget that extends it even further. You should then be able to nest further menus if that's what you need it to do. Flutter DropdownButton2

How to show a container / dialog next to an icon when the icon is tapped?

Hi I'm trying to create a screen that have bunch of container with a child of row that have a text and a Icon (the red one - can be seen on the image). So when I click the icon I want to show a dialog right next to the icon. I tried using aligned_dialog but the positioning is really hard to do, I want it to be instantly next to the icon just like the image.
Is there any package or widget that I can use to achieve this ?
You can check this package: https://pub.dev/packages/just_the_tooltip
It allow to specify a child of type Widget, so you can add what you want.

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

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.