I\' m gettings items from JSON and displaying them in a dropdown. When the person select an item from the dropdown list, I get the selection but the selected item doesn\'t c
Is used this code in my most recent app and it works. Maybe you could compare it to your code.
return DropdownButton(
style: Theme.of(context).textTheme.title,
items: _persons.map((String val) {
return new DropdownMenuItem(
value: val,
child: new Container(
child: new Card(
child: new Row(children: [
new Icon(Icons.person),
new Text(val),
]),
),
),
);
}).toList(),
hint: new Card(
child: new Row(children: [
new Icon(Icons.person),
new Text("check"),
])),
value: _selectedPerson,
onChanged: (newVal) {
_selectedPerson = newVal;
setState(() {});
});