-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Make sure that a SwitchListTile doesn't crash in 0x0 environment #178069
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
Make sure that a SwitchListTile doesn't crash in 0x0 environment #178069
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a regression test to ensure that SwitchListTile does not crash when placed in a zero-sized environment. The new test case is well-written, correctly reproduces the scenario described in the related issue, and verifies that the widget behaves as expected without crashing. This is a valuable addition to prevent future regressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a new widget test to ensure that SwitchListTile does not crash when rendered in a zero-sized environment, addressing a reported issue. The test correctly simulates the problematic scenario by wrapping SwitchListTile within a SizedBox.shrink. The implementation is correct and follows best practices for Flutter widget testing. No issues were found.
dkwingsmt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checklist:
- The test is in the correct file
- The test name goes “does not crash at zero area”
- The target widget is wrapped by
Center(or is fullscreen) - The target widget does not have an overlay, or the overlay is tested
- The target widget is expected to have a size of exactly
Size.zero
…tter#178069) This is my attempt to handle flutter#6537 for the SwitchListTile widget. Co-authored-by: Victor Sanni <[email protected]>
…tter#178069) This is my attempt to handle flutter#6537 for the SwitchListTile widget. Co-authored-by: Victor Sanni <[email protected]>
…tter#178069) This is my attempt to handle flutter#6537 for the SwitchListTile widget. Co-authored-by: Victor Sanni <[email protected]>
This is my attempt to handle #6537 for the SwitchListTile widget.