I know there is DropDown Button but how dropdown button work is it show content in popup style and i want to implement autocomplete textfield and want to interact with textfield while suggestion come under textfield.
There is a package available for this that you can use and it works very nicely.
You can also fetch the suggestions list from API.
Here is the link
https://github.com/jebright/flutter_typeahead_plugin
Related
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
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.
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 would like to hide a Text widget when a user is currently tapped into a TextFormField to type. And when they aren't using it, I would like for it to be visible again. Only problem is I don't see a way to accomplish this. Any help is appreciated!
The easiest way is to check whether the user is using TextField or not is by detecting whether the keyboard is visible or not. For that follow this stack-overflow post. Once you know whether keyboard is visible or not, you can simply update the state(setState()) and decide whether to hide the widget or not. Follow this stack-overflow post as a reference to hide and un-hide widgets in flutter.
I'm tring to using Flutter to building a reading application, where I want users to tap in the article and the word clicked will be highlighted. Is there a way to know which child is clicked in flutter? Or I have to using a list of Textspan to achieve that.