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

Refresh list when state is changed from FutureBuilder #13

Merged
merged 3 commits into from
Aug 6, 2018

Conversation

brettpappas
Copy link
Contributor

This change allows the parent Widget to update state and have the snapshot data reload the list if it is a different size. It compares the widget.rowsData to the local rows and updates rows IF the user isn't currently dragging (since dragging alters the number of rows while being dragged).

@Norbert515
Copy link
Owner

There is a method called didUpdateWidget which is more appropriate for this. Looking at my commits it deleted that for some reason some time ago. But I assume it should be alright.
Can you put that code in the didUpdateWidget method?

@brettpappas
Copy link
Contributor Author

I saw your commit where you deleted it so I wasn't sure if you were trying to avoid using that method. Let me try using it and I will update my code.

@Norbert515 Norbert515 mentioned this pull request Aug 3, 2018
@brettpappas
Copy link
Contributor Author

This PR is now using the didUpdateWidget method and seems to work well in my tests.

@Norbert515 Norbert515 merged commit 58bd00b into Norbert515:master Aug 6, 2018
@Norbert515
Copy link
Owner

LGTM

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

Successfully merging this pull request may close these issues.

2 participants