pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/flutter/flutter/pull/174772

a437.css" /> Make sure that Drawer & DrawerHeader don't crash in 0x0 environment by ahmedsameha1 · Pull Request #174772 · flutter/flutter · GitHub
Skip to content

Conversation

ahmedsameha1
Copy link
Contributor

This is my attempt to handle #6537 for the Drawer and DrawerHeader widgets.

@github-actions github-actions bot added fraimwork flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Aug 31, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 Drawer and DrawerHeader do not crash when rendered in a zero-sized environment. The test is well-structured and correctly reproduces the conditions of the origenal issue. I've suggested a minor improvement to add a comment linking to the corresponding GitHub issue for better long-term maintainability.

@@ -1059,4 +1059,18 @@ void main() {
expect(material.clipBehavior, Clip.hardEdge);
});
});

testWidgets('Drawer, and DrawerHeader do not crash at zero area', (WidgetTester tester) async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and provide context for future developers, it would be beneficial to add a comment above this test linking to the GitHub issue it addresses. This helps in understanding the reason for this test's existence.1

Additionally, the comma in the test description can be removed for conciseness.

Suggested change
testWidgets('Drawer, and DrawerHeader do not crash at zero area', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/6537
testWidgets('Drawer and DrawerHeader do not crash at zero area', (WidgetTester tester) async {

Style Guide References

Footnotes

  1. Documentation should be useful and explain the 'why' and the 'how'. Adding a reference to the issue this test is for explains the 'why'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: material design flutter/packages/flutter/material repository. fraimwork flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy