[Error code](https://i.stack.imgur.com/nX0PJ.png)
Hi I'm new to flutter and have a question about dropdownbutton regarding using the same values for multiple dropdownbutton.

From my understanding from the error, it was due to using the same list for 2 or more dropdownbuttons in the same activity.

How am i able to resolve this error but still able to reuse the list for 2 or more dropdownbuttons?

```
  String _value1;
  String _value2;

  final List<String> nameList = <String>[
    "Name1",
    "Name2",
    "Name3",
    "Name4",
    "Name5",
    "Name6",
    "Name7",
    "Name8"
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 2.0,
        title: Text('Hello'),
      ),
      body:  ListView(
            children: <Widget>[
              Row(
                children: <Widget>[
                  Text('Name: '),
                  Center(
                    child: DropdownButton(
                      value: _value1,
                      onChanged: (value) {
                        setState(() {
                          _value1 = value;
                        });
                      },
                      items: nameList.map(
                        (item) {
                          return DropdownMenuItem(
                            value: item,
                            child: new Text(item),
                          );
                        },
                      ).toList(),
                    ),
                  ),
                ],
              ),
              Row(
                children: <Widget>[
                  Text('Name: '),
                  Center(
                    child: DropdownButton(
                      value: _value2,
                      onChanged: (value) {
                        setState(() {
                          _value2 = value;
                        });
                      },
                      items: nameList.map(
                        (item) {
                          return DropdownMenuItem(
                            value: item,
                            child: new Text(item),
                          );
                        },
                      ).toList(),
                    ),
                  ),
                ],
              ),
            ],
          ),
      backgroundColor: Colors.grey[200],
    );
  }
}

```