srtraj / dropdown_textfield

custom dropdown
MIT License
8 stars 48 forks source link

Store the string from DropDownValueModel(name, value) to a variable #50

Open dy-chrstn opened 7 months ago

dy-chrstn commented 7 months ago

I can't access specifically the name or value when I call the val in onChanged: (val) {}

it only shows these options. image

Abdulvaliy commented 6 months ago

@dy-chrstn You can try like this

onChanged: (val) {
  DropDownValueModel value = val;
  print("value is: ${value.value}");
},