Welcome to the Flutter feedback portal. We’re happy you’re here! If you have feedback on how to improve the Flutter, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
colorValueMapper: (TreemapTile tile) { return nutrientItems[tile.indices[0]].color; },
Let's say this is my colorValueMapper. This fetches the item the current tile is displaying, and then returns it's color from the nutrientItems list item. Let's say i call `setState()` and change the nutrientItems list. Now, the nutrient items list has different items inside, and their respective colors are also different, but the colorMapper still 'remembers' the older colors of the respective indices in the previous list, and displays those for the respective indices, until it runs out of items (the new nutrientItems list is larger than the first one) at which point it starts fetching the colors for the new items that are there in the list and starts returning them. Basically, if there are 2 items in the list, it creates a value mapper for those 2 indices, and then if you reset the list, and now it has 3 items, for the first 2 indices, it displays the color for the first 2 indices in the older list, and for the third item, it displays the color for the first item in the newer version of the list.