How to change selected value text color in DropdownButtonFormField?


I am using dropdownbuttonformfield for creating dropdown. I need to change selected value text color white and dropdown items text color should be black as shown in image. I need to change color for image 1.
image 1

image 2

>Solution :

selectedItemBuilder: (context) {
    final List<DropdownMenuItem<String>> list = [];
    for (int i = 0; i < tpoicList.lenght; i++) {
        value: tpoicList[i],
        child: Container(
          child: Text(
            style: i == dropdownValue? 
            const TextStyle(color:,
    return list;

Leave a ReplyCancel reply