Flutter: There should be exactly one item with [DropdownButton]’s value

Well, since no problem has an exact same solution. I was facing the same issue with my code. Here is How I fixed this. CODE of my DropdownButton: DropdownButton( items: _salutations .map((String item) => DropdownMenuItem<String>(child: Text(item), value: item)) .toList(), onChanged: (String value) { setState(() { print(“previous ${this._salutation}”); print(“selected $value”); this._salutation = value; }); }, value: … Read more