Questions tagged [flutter-dropdownbutton]

94 questions
0
votes
1 answer

How to get multiple values from DropdownButtonFormField in flutter?

selecting one item from dropdown menu, i want to show its multiple values inside textfields in flutter. For example, if I select school it will show its name, location, contact no. so i need to collect multiple values from that item. how can i have…
0
votes
2 answers

Change selection of dropdown button according to the choice from the previous one, Flutter

I have 2 DropdownButtonFormFields where I have a selection of cars. I need to change the second selection of buttons according to the car model user has chosen from the first selection in the DropdownButtonFormField (i.e. If a user chooses a…
GrandMagus
  • 600
  • 3
  • 12
  • 37
0
votes
1 answer

I'm getting a value selection error in the dropdownmenu

When I tap the add new document button in the app, I wanted the dropdown menu to be reset always. But the value of dropdown items are sync work. When I'm clicking the add new document button as below image. Normally, it should reset itself when…
0
votes
1 answer

Flutter issue: DropDown in ListView.Builder

i am getting values from server to dropdown which are inserted previous from static list of dropdown values, but i need to use dropdown when value from server is 'Pending' to update specific record, below my code. List approvalList =…
0
votes
1 answer

how to design dialog box inside DropdownButtonFormField in flutter?

I have DropdownButtonFormField when I click on it a DialogBox with a list of items should appear, so I can select one item and it should return the selected item in DropdownButtonFormField.I tried with DropdownMenuItem but I need with DialogBox so…
0
votes
1 answer

Cannot update DropdownButtonFormField field value in flutter with getx obs

I am using getx obs with fluter and the below is json response. [{"id":1,"designation":"Deputy General Manager"},{"id":2,"designation":"Executive Director, Technical Operations","designation_short_code":"ED,…
0
votes
2 answers

Flutter Dropdown: Error: Object? newValue issue

I am a few weeks into a flutter. I like it a lot but I have an issue that I don't understand. I used the approach below for a drop drown. It works just fine in the dartpad but Visio throws an error and I am not sure what to do about it. Please…
0
votes
1 answer

Create Dropdown Button that unfolds with hover

I want to create a DropdownButton that unfolds when I hover over the Button. So basically I don't have to click to unfold the DropdownButton. Does anyone has a code sample or could help me with that?
0
votes
2 answers

I can't change the hinttext in the dropdownButton

This is my code, and i dont know why the hint doesnt change, when i click the options, obviously all this code is inside a class, I tried to use a for loop to identify the list positions , and if they were right, it would appear on the screen. final…
0
votes
1 answer

How to clear the dropdown button in flutter

im new in flutter and I create a drop down button fields in flutter for the record form. My question is when I click save in the record, how can I make the dropdown is clear (back to the first or no value) for now when I click save, it did not reset…
0
votes
1 answer

How to add validator in drop down In flutter

im new in flutter and I'm using drop down in the record fields but I want to make if the user did not fill the drop down and the user click the save button, it will show the "Please fill up the drop down" but in the code, im trying to add…
New user
  • 147
  • 4
  • 18
0
votes
2 answers

DropDownButton Does not show the option that I chose

I am using Flutter and are planning to make a dropdownbutton for user to select from. Upon selecting one of the option it will still shows the hint instead of the option that the user chose. this is the code: DropdownButton( …
0
votes
2 answers

DropdownButton giving red screen

I have a screen that has 2 dropdownbuttons (agency and agents). When the agency is selected in the first dropdownbutton, the second dropdownbutton, agent, is enabled and populated. When the second dropdownbutton is enabled and populated I am getting…
LostTexan
  • 431
  • 5
  • 18
0
votes
1 answer

Create Item list for DropdownButton in Flutter

I'm back with another issue with the DropdownButton. The DropdownButton is not enabled. I found this in api.flutter.dev If the onChanged callback is null or the list of items is null then the dropdown button will be disabled, i.e. its arrow will be…
LostTexan
  • 431
  • 5
  • 18
0
votes
2 answers

Pulling data from QuerySnapshot in flutter

I need to populate a DropdownButton from a document in Firestore. I can retrieve the data. When I look into the snapshot.data I see 2 records which is what I expect to see. In the code below, everything works fine as long as I comment out the code…
LostTexan
  • 431
  • 5
  • 18