Flutter desplegable Button enum
enum ClassType {A, B, C, D}
return DropdownButton<ClassType>(
value: classType,
onChanged: (ClassType newValue) {
setState(() {
viewModel.classType = newValue;
});
},
items: ClassType.values.map((ClassType classType) {
return DropdownMenuItem<ClassType>(
value: classType,
child: Text(classType.toString()));
}).toList();
);
Ricky