코드
List<String> dropdownList = ['1', '2', '3'];
String selectedDropdown = '1';
..
..
DropdownButton(
value: selectedDropdown,
items: dropdownList.map((String item) {
return DropdownMenuItem<String>(
child: Text('$item'),
value: item,
);
}).toList(),
onChanged: (dynamic value) {
setState(() {
selectedDropdown = value;
});
},
),