Questions tagged [dropdownbutton]

DropDownButton is a flutter Widget that creates the Select-Option Menu

201 questions
0
votes
2 answers

SetState doesn't do its job - Flutter

When my DropdownButton updates the value it contains, it does so with it, the setState updates the highlight text of my button. But the same variable "ms" that is updated inside the button is not sent correctly to "EventiWidget", the first value of…
0
votes
2 answers

Why do I have, and how to prevent, duplicate items in DropDownButton items?

I'm creating a simple interface for user to select a client from a dropdown. However I end up with duplications of values in the menu items. How do I prevent this? (and why is it happening?) The list of clients is a singleton that might be populated…
Andre Clements
  • 634
  • 1
  • 7
  • 15
0
votes
1 answer

Dropdownbutton list not updating

final activities = ['select']; @override void initState() { FirebaseFirestore.instance.collection('activities').get().then( (snapshot) => snapshot.docs.forEach((document) { activities.add(document.reference.id); …
pika3113
  • 45
  • 5
0
votes
1 answer

Either zero or 2 or more [DropdownMenuItem]s were detected with the same value in Flutter

I am using DropDownButtonHideUnderline widget And I manage the state of this widget with getx I think the problem is because of the value property value of the DropdownButton2 widget Can anyone help me? And the widget code is like…
0
votes
1 answer

How to Change the splash color when tapping DropdownButton In flutter?

In DropdownButton widget of the flutter, I want to change the splash color when tapping. Although I change the focusColor of the DropdownButton but nothing changes... How to do this??? Container( height: 20, padding:…
La Pyae
  • 371
  • 3
  • 19
0
votes
2 answers

Populate dropdownbutton2 with data from json array in flutter

How can I populate data for dropdownbutton2 with data from a json array here is a sample of the json in flutter "data": [ { "id": "1", "name": "Floral" }, { "id": "4", "name":…
0
votes
0 answers

DropdownButtonFormField AutovalidateMode.always

im trying to implement a DropdownButtonFormField to use the validator function, to show "error" message when is selected '1' but im doing something wrong because isnt working, this is my simple code, can you help me? class ValidateDropdownButton…
0
votes
3 answers

DropDownButton inside FutureBuilder gets "Null check operator used on a null value" error

I'm trying to create a DropDownButton using the data from a table. I've created a function to return a list of objects which then can be used to convert those to a list of string but I keep getting "Null check operator used on a null value" error.…
0
votes
1 answer

Dropdownbutton state management, Flutter

I coded a dropdownbutton so it gets the items from a database from back4app, it shows the user the items that he saved on said database. But when I try to hold the state for the selection of said item, it shows a blank dropdownbutton, eventhough it…
Giorno
  • 1
  • 1
0
votes
2 answers

How to change value on DropdownButton in onChange in Flutter

I am a beginner in the flutter I'm just learning flutter and I am stuck in this code how to solve this please help me? import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget{ @override …
0
votes
1 answer

Add a tooltip only on disabled dropdown item from a dropdownButton (react-bootstrap)

So I have a table with an actions column and I wanted disable a dropdown item based on a reason and show a tooltip message only on that disabled element. Here are the actions and the way I tried to do that but the tooltip is rendered on all buttons…
0
votes
2 answers

Flutter Dropdownbutton state is not updated - Everything else works fine

I have created a stateful customer information form and the there are two widgets that use the state - two list tiles with radio buttons and a drop down button. The list tiles respond to the code and updates their states and saves the data to the…
0
votes
2 answers

DropdownButtonFormField Reset after submit a form in Flutter

How to reset a DropdownButtonFormField value to default value or reset DropdownButtonFormField after submitting a form.
0
votes
1 answer

How to send DropDownButton values like TextEditingController for TextFormField in Flutter

I'm trying to send the DropDownButton selected values to EmailJS. I'm using TextEditingController for TextFormField and it's working fine and the values taken by EmailJS. How I can send the DropDownButton values whichcontroller I can use in…
0
votes
1 answer

I have 2 dropdownbuttons and i cant make one depend on the other one

I have 2 dropdown buttons, which one have a list with an 'id' and a 'name' and i need to make like when i choose a option from one dropdown button only appear a certain number of options in the second dropdown button. In the image 4 if i choose a…