DropDownButton is a flutter Widget that creates the Select-Option Menu
Questions tagged [dropdownbutton]
201 questions
0
votes
0 answers
How to fetch the text displayed on dropdown button in flutter
I have a dropdown button in which I am binding id to value and name to display Text. When user select an item from dropdown, I am getting the value using onChanged. How can I get the displayed text along with the value?
return Obx(() =>…

user19976096
- 27
- 5
0
votes
2 answers
how to use 'dropdownbutton'?
There was an error when I inserted the DropdownButton code into my code.
Outside the code containing the body, they declared it as a class, and when I put the class declared in the code, an error message appeared as below.
'_AssertionError…

HHY K
- 13
- 1
0
votes
1 answer
How to make Dropdown Button Seprate class andd use in any where in flutter project?
I make Seprate DropDownButton custom StatelessWidget class but its
give me error.
Error=>
There should be exactly one item with [DropdownButton]'s value:
Instance of 'Company'. Either zero or 2 or more [DropdownMenuItem]s
were detected with…

nitish chauhan
- 75
- 8
0
votes
1 answer
Cannot get DropdownButton inside Dialog to update to new value on changed/selected
Here is what I have.
String selected = "ONE",
final List> types = [
DropdownMenuItem(value: "ONE", child: Text("ex1")),
DropdownMenuItem(value: "TWO", child: Text("ex2")),
...
];
@override
Widget build(context) =>…

kenta_desu
- 303
- 1
- 9
0
votes
0 answers
How can I manage DropDownButton depending on tab?
I'm trying to make two tabs and put a DropDownButton besidse them.
`
However, I should make DropDownButton dependging on what tab I choose.
For example, if I click tab1, DropDownList1 should apply to DropDownButton, and click Tab2, DropDownList2…

yunju
- 13
- 5
0
votes
1 answer
How i can display my array in dropDownButton , flutter?
I have a problem. Please help. I just started the program in a flutter. I want to display my array list(foto) to DropDownButton.
array list in firebase ,
final List listCategorys = FirebaseFirestore.instance
…

Patryk
- 3
- 3
0
votes
1 answer
the value doesn't get assigned when i pass the sharedpreference data into it, i am able to print out the data yet the variable get assigned null
what im trying to do is passing a value hour into another page, into the dropdownbar for user to update the hour, but when i tried to use sharedpreference to store the data and get the data out. I am able to print out the data during the print(get)…

Lim
- 31
- 6
0
votes
3 answers
How can I make dropdownbutton using Getx in flutter?
I'm trying to make dropdownbutton using Getx in flutter
However, it doesn't work.
Even if I choose a value, the value does not been selected.
class BecomePlayerPage2 extends GetView {
const BecomePlayerPage2 ({Key? key}) :…

yunju
- 13
- 5
0
votes
1 answer
Selected value from DropdownButton not showing in Flutter
I have a DropdownButton which displays user type.
List items = ['Engineer', 'Technician', 'Sales'];
String? currentSelectedValue;
child: DropdownButtonHideUnderline(
child: Padding(
…

user19976096
- 27
- 5
0
votes
1 answer
How can I remove/disable an item in a DropdownButton's item list if it's selected on a second one (and vice-versa)?
I'm trying to make a pair of dropdown buttons that take their items from the same list, and selecting a value in one disables it in the other one, and vice versa (much like Translators software, or conversions, as this example is the second one).
I…
0
votes
1 answer
Why the DropDownButtonFormField does not need a setState to to rebuild, while the DropDownButton needs it?
I tried to figure it out, and read the documentation for both but I didn't find an answer, here is an example of what I mean:
List items = ["item1", "item2", "item3", "item4"];
class HomeScreen extends StatelessWidget {
…

Abdelrahman Anwar
- 60
- 7
0
votes
1 answer
Reset DropDownMenu
I have a page with a DropdownButton.
The hint is 'Select your choice'.
When an item is selected in the DropdownButton when I click on a button I want the DropdownButton to go back to the beginning and show 'Select your choice' again.
child:…
0
votes
1 answer
Conditional statement for DropdownButtonFormFields in registeration form
Still a newbie with flutter and was wondering if someone could help me with a problem I'm having. I am trying to create a registeration form with email, password, password confirmation, a county and a zip code. (County and zip code forms are the…

Rasse
- 1
- 1
0
votes
2 answers
Flutter - DropdownButton not showing selected item
When I select one of the items in the DropdownButton it is suppose to change from the hint text to the selected item.
It keeps on showing the hint text, like I did not select any thing. Although I print the selection to the console and I can see my…

Johan Scheepers
- 113
- 7
0
votes
1 answer
how to get the child string from the dropdown menu item in flutter
I am new in flutter...
I need to get the String inside the text field in Dropdown menu button while onChange function called... here is my code below...
BlocBuilder(builder: (context, state) {
if (state.hasError)…

Mohamed Shafeeq
- 35
- 6