How to set array stored in Firebase (as values) to Dropdown and bind to previous dropdown in Flutter

@vm82 you are missing the toList() call at the end of your Map

getRechar().map<DropdownMenuItem<String>>((String val) {
          return DropdownMenuItem<String>(
            value: val,
            child: Text('${val}'),
          );
        })

Should be

getRechar().map<DropdownMenuItem<String>>((String val) {
          return DropdownMenuItem<String>(
            value: val,
            child: Text('${val}'),
          );
        }).toList()

Hope this helps!

1 Like