one dropdownbutton many values

51 Views Asked by At

I have a problem: How can I have two different values in one dropdown button?

Example:

animals: dog, cat, caiman.

Fruits: mango, tomato, watermelon.

I want animals and fruits to be in fat and dog, cat, caiman, mango, tomato, watermelon to be in italic.

1

There are 1 best solutions below

0
On

You can use flutter_smart_select. It allows you to design the options/choices in the dropdown and also you can show them in groups as you have stated in your question.