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

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.

Related

How can i achieve this with flutter?

enter image description here
On clicking any of the tabs I want to expand the container which contains textfield as in picture 2.
enter image description here
Then I want to switch tabs but second click on same tab should contract the container like before.
maybe you can use ExpansionTile widget.

DropdownButton - don't show popup on tap

I want to show my own page on dropdown button tap, then item selected on page should be set as dropdown button value.
So basically, I need DropdownButton without any popup on tap. When I use onTap still default popup will be shown, how to prevent that?
why you don't use a button instead? or you can try to create an Inkwell put a container on its child and make it look like a button and write your code inside Inkwell OnTap(){}
1- Pass null to items parameter to disable the button.
2- You'll notice icon's color will be grey with disabled button, you can change it by setting color of the icon you send to icon parameter or send color directly to iconDisabledColor parameter.
3- You'll not use value parameter, instead you'll just use hint to show both your hint and your value. and update it using your state management after you pick new value from your own page.
4- Wrap your DropdownButton with GestureDetector or InkWell to show your own page when you tap on the button.
5- If you want to customize your DropdownButton shape, size and more. You can try my new package DropdownButton2. It's simple, easy, based on Flutter's core DropdownButton and have lots of features.

Using AlertDialog on a stack widget in 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.

I want to make a container under app bar which works like a secondary App Bar where I can put my back icon button and title in the center in flutter

I have tried everything. But I can't find a permanent solution How to put the title in the center while my back icon button on the left side. I want to use this secondary app bar on every screen of my app.
Please check the image below for a better understanding.
This is the problem that I am facing
Take a ListView Widget at body of Scaffold and in its children put first widget as a ListTile that comes under AppBar. So that there will be a leading icon and title in center. After that take a Column and add your needed widgets for every page.

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.