title: Making Unique List Tile item in Flutter from Builder
body: <p>I was wondering if it was possible to make items in List View unique in the sense that if I want to add something to the one, it only changes that particular list tile item, for example, if I added a <strong>leading</strong> icon from the DropDown to the one on the list, it adds that icon only to that particular list tile, and not the others (I can then add other icons from the dropdown to other list tile items).</p>
  <p>Here's the code for it, I am not sure if this is possible since the builder is made from Bloc and an existing class <strong>Person</strong>, basically a template for each list item.</p>
  <pre><code>child: BlocConsumer&lt;PersonBloc, List&lt;Person&gt;&gt;(
          builder: (context, personList) {
            return ListView.separated(
              itemBuilder: (BuildContext context, int index) {
                print(&quot;personList: $personList&quot;);
  
                Person person = personList[index];
                return ListTile(
                key: UniqueKey() //added unique key here, but it still fails
                //for example, is it possible to make this list tile unique
                //if I make change to it, it only changes the one I change, and not
                //all of them in a list at once
                //leading: DropDownButton() -&gt; if I had a dropdown here with icon choices
                //would it be possible for that icon only to be chosen for a particular item on the list?
                    trailing: Icon(Icons.person),
                    title: Text(&quot;${person.name} ${person.age}&quot;,
                        style: TextStyle(fontSize: 30)),
                    subtitle: Text(
                      &quot;person.name&quot;,
                      style: TextStyle(fontSize: 25),
                    ),
                    onTap: () =&gt; showDialog(context, person, index));
              },
              itemCount: personList.length,
              separatorBuilder: (BuildContext context, int index) =&gt;
                  Divider(color: Colors.black),
            );
          },
          listener: (BuildContext context, personList) {},
        ),
  </code></pre>
  <p>more is explained in the comments.</p>
  <p><strong>EDIT</strong>
  The UniqueKey() doesn't work, I tested in on my old test app I was making that works similarly with the ListTile as well, and when you change the dropdown for one, it changes automatically for all the items:</p>
  <p><a href="https://i.stack.imgur.com/i9X4o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i9X4o.png" alt="enter image description here" /></a></p>
  <p>Also, here's the dropdown just so you can see if something should be changed there:</p>
  <pre><code>Widget _buildSize() {
  return DropdownButton&lt;String&gt;(
    focusColor: Colors.white,
    value: _chosenSize,
    //elevation: 5,
    style: TextStyle(color: Colors.white),
    iconEnabledColor: Colors.black,
    items: &lt;String&gt;[
      '',
      'S',
      'M',
      'L',
      'XL',
    ].map&lt;DropdownMenuItem&lt;String&gt;&gt;((String value) {
      return DropdownMenuItem&lt;String&gt;(
        value: value,
        child: Text(
          value,
          style: TextStyle(color: Colors.black),
        ),
      );
    }).toList(),
    hint: Text(
      &quot;Size&quot;,
      style: TextStyle(
          color: Colors.black, fontSize: 14, fontWeight: FontWeight.w500),
    ),
    onChanged: (String value) {
      setState(() {
        _chosenSize = value;
      });
    },
  );
  </code></pre>
  <p>}</p>