Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redux Listview rebuild all TodoList, but only repaint one TodoItem #175

Open
WingCH opened this issue Feb 16, 2020 · 0 comments
Open

Redux Listview rebuild all TodoList, but only repaint one TodoItem #175

WingCH opened this issue Feb 16, 2020 · 0 comments

Comments

@WingCH
Copy link

WingCH commented Feb 16, 2020

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, 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'.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant