DropDownButton is a flutter Widget that creates the Select-Option Menu
Questions tagged [dropdownbutton]
201 questions
0
votes
1 answer
Flutter DropDownButton not displaying Selected Value
I am currently working on a Flutter App for grocery scanning and organization. I need this drop down button to select where the grocery item is being stored: shelf, fridge, or freezer. This is the code for my function which controls the drop down…

Cory Eheart
- 33
- 3
0
votes
1 answer
updating two lists with different values ontap dropdownmenu2 (multiselect) from firestore flutter
i have a firestore collection (conttyp) with documents (client, contractor, supplier, employee) and every document have only one (title) field like (عميل, مقاول, تاجر, موظف)
i'm trying to store the value as doc id to a list and save to another table…

Mohamed Elgendy
- 3
- 2
0
votes
0 answers
How to return a value to enum not string in a dropdown button?
Here's the snippet for the dropdown items widgets:
items:
categoryList
.map((item) => DropdownMenuItem(
value: item,
child: Text(
item,
style: const TextStyle(
fontSize: 14,
…

jhonny
- 1
0
votes
1 answer
Flutter: additional items in dropdown menu items
How can I add two additional items in list in dropdown items? One textfield for search and one for text button.

arcthurus
- 75
- 6
0
votes
0 answers
Flutter test: Tap would not hit the specified widget when testing dropdown
I am currently writing tests for a dropdown for my flutter app.
In this app I have a CustomDropdownButton2 to change the language of the app. It contains strings for the different language.
My test for this looks like this so far:
…

Sebb
- 121
- 2
- 10
0
votes
2 answers
Flutter dropdownbutton changed value is not displaying
I'm new in flutter. I've created a simple project.
It is fetching documents of person collection from cloud firestore.
There is a modal screen to create new person document (it is opening When I touch the + button)
I have a problem In that…

Ufuk Ugur
- 186
- 1
- 17
0
votes
1 answer
Flutter : DropdownButtonFormField2 selected item changes to initial value on screen rotation
In my flutter application screen I have a DropdownButtonFormField2 which list various financial years, where after fetching the financial year list I set the current financial year as the initial(default) selected value in the dropdown as code…

KJEjava48
- 1,967
- 7
- 40
- 69
0
votes
0 answers
How to make ElevatedButton active only if value in DropdownButton is selected?
I have a DropdownButton and below it an ElevatedButton.
I want the ElevatedButton to be active only if a value in the DropdownButton is selected.
The " .isEmpty ? null " in the onPressed parameter of ElevatedButton does not do the job…

mar
- 21
- 3
0
votes
1 answer
How to call a form from an 'Add New' DropdownButtonFormField
I'm a degreed 25 yr computer scientist but new to Flutter and mobile apps in general.
I am building forms now and want to append an 'Add New' item at the bottom of a list of existing members in a DropDownButtonFormField. If a user selects the 'Add…

Barry Prentiss
- 1
- 1
0
votes
1 answer
The following _TypeError was thrown building RegisterScreen() : type 'String' is not a subtype of type 'int' of 'index'
String? _selectedCity;
List cities = ['Select City'];
@override
void initState() {
super.initState();
_secureText = true;
_getCities();
}
Future _getCities() async {
var url = "baseurl/api/v1/cities";
try {
var…

Lochan Pun
- 1
- 1
0
votes
0 answers
Change radius of google search api with a dropdown button in flutter
I'm trying to get a list of veterinary clinics within a certain radius using google-maps-api. I am able to get the clinics in one radius but not getting any results when trying to add more radius' with a dropdownbutton. the radius' should be…

aarav
- 1
- 1
0
votes
1 answer
How to make flutter return a list of node names of firebase
`final dbRef = database.child("Blocos");
dbRef.onValue.listen((event) => {
event.snapshot.children.forEach((child) {
if (child.key != null) {
item.add(child.key.toString());
}
})
});
print(item);
Firebase Rtdb
when…

Salocin
- 1
- 1
0
votes
1 answer
Error DropdownMenuItems detected with same value Flutter
I get this error from the DropdownButton Widget.
`There should be exactly one item with [DropdownButton]'s value: Seleccionar.
Either zero or 2 or more [DropdownMenuItem]s were detected with the same…

Juan Peralta Torres
- 37
- 8
0
votes
1 answer
There should be exactly one item with [DropdownButton]'s value: . Either zero or 2 or more [DropdownMenuItem]s were detected with the same value
it shows this error.
There should be exactly one item with [DropdownButton]'s value: .
Either zero or 2 or more [DropdownMenuItem]s were detected with the same value
'package:flutter/src/material/dropdown.dart':
Failed assertion: line 890 pos 15:…

Ngọc Trần
- 1
- 1
0
votes
0 answers
I have problem in dropDownButton in Flutter. Can anyone help me?
here is my code of dropDownButton.I'm trying to making select GenderList dropDownButton but when I assign variable selectedGender to value of dropDownButton it's hide hint text and default select first index value Male.
I want this output
But I'm…

khabib ali
- 1
- 1