title: Card Widget won't update even though I wrap in a setState
body: <p>Below is a card widget which I have created. Why is it that when I press the button the variable <em><strong>cardDetailsCurrLevel</strong></em> even though it is inside the <em><strong>setState</strong></em>, it won't get updated? Please help. Thanks!</p>
  <pre><code>Widget build(BuildContext context) {
    getCardDetailsDetails(widget.cardDetailsIndex);
  
    return Padding(
      child: ClipRRect(
        child: Material(
          child: Container(
            decoration: BoxDecoration(
              border: Border.all(
                width: 1.0,
              ),
            ),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.end,
              children: &lt;Widget&gt;[
                Text(cardDetailsCurrLevel.toString()),
                ElevatedButton(
                  onPressed: () {
                    setState(() {
                      cardDetailsCurrLevel = cardDetailsCurrLevel + 1;
                    });
                  },
                  child: const SizedBox(
                    child: Center(
                      child: Text(‘Add’),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
  </code></pre>
  <p>The card widget above being used in a ListView.
  Edit: Added the Widget build.</p>
  <pre><code>@override
  Widget build(BuildContext context) {
  
  return Column(
    children: &lt;Widget&gt;[
      Expanded(
        child: ListView.separated(
          itemCount: fullCardDetailsList.length,
          key: UniqueKey(),
          itemBuilder: (context, index) {
            getCardDetailsDetails(fullCardDetailsList[index]);
  
            return Column(
            children: [
              CardDetailsCard(
                cardDetailsIndex: fullCardDetailsList[index],
              ),
            ],
            );
          },
          separatorBuilder: (context, index) {
            return const SizedBox(
              height: 0.0,
            );
          },
        ),
      ),
    ],
  );
  }
  </code></pre>