0

I made 2 dropdown in flutter, the data I get from API. In the first dropdown, showing 2 brands of car. In the second dropdown, showing type of car dependent brand of car. When I choose the first dropdown, type of car successfully showed. Then I choose the second dropdown. There is no issue for that. But when I repopulate brands of car, there is error showed

There should be exactly one item with [DropdownButtonFormField]'s value: Instance of 'Data'. Either zero or 2 or more [DropdownMenuItem]s were detected with the same value

first dropdown

this is the first dropdown

second dropdown

and this is the second dropdown

thanks in advice.

  • 1
    [Why should I not upload images of code/data/errors?](https://meta.stackoverflow.com/q/285551/10157127) and try [this](https://stackoverflow.com/a/73446365/10157127) – Md. Yeasin Sheikh Jun 02 '23 at 09:26

0 Answers0