flutter
flutter copied to clipboard
Fix assertion failure when reordering two dimensional children
It fixes assertion failure due to unstable state of children list during reordering in RenderTwoDimensionalViewport.parentDataOf. This changes the assertion to check debug orphan list and keepAlive bucket in addition to children list to determine whether child belongs to this render object or not.
- Fixes #141101
Pre-launch Checklist
- [X] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [X] I read the Tree Hygiene wiki page, which explains my responsibilities.
- [X] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
- [X] I signed the CLA.
- [X] I listed at least one issue that this PR fixes in the description above.
- [ ] I updated/added relevant documentation (doc comments with
///). - [X] I added new tests to check the change I am making, or this PR is test-exempt.
- [X] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.