brianegan / brianegan/flutter_architecture_samples
Redux Listview rebuild all TodoList, but only repaint one TodoItem
- Dominant language
- Dart
- Stars
- 8.9k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, i am learning Redux, your sample is very helpful.
But I have some questions and hope to answer them...
In **redux** sample, when i click `Checkbox`, StoreConnector(FilteredTodos) will return whole TodoList, ListView.builder(TodoList) will rebuild all `TodoItem`, so i thinks the all `TodoItem` should be rebuilded.
However, in reality, when i open Flutter inspector - `Repaint Rainbow ` this can _Shows rotating colors on layers when repainting._, according to photo only `TodoItem` that are clcik will be repainted.
I tried deleting 'key', but the result is the same.
In [When to Use Keys - Flutter Widgets 101 Ep. 4](https://youtu.be/kn0EOS-ZiIc?t=172), Statless Widget only will compared the type and key to update widget, I don't know why it only rebuild one `TodoItem` rather than all 'TodoItem'.

Contributor guide
Assessment
This issue has not been assessed yet.