79146125

Date: 2024-10-31 19:37:26
Score: 0.5
Natty:
Report link

It's because you're no longer using const constructors. Flutter has an optimization where it will short-circuit rebuilding subtrees if a widget is identical (not equal) between rebuilds. You can see the same thing happens if you just remove const without adding keys: the new Widget instances are not identical, so Flutter uses the keys to link the existing State instances with the new Widget instances, calls didUpdateWidget on each State, then rebuilds the tree.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: jmatth