Skip to content

Make sure that a SimpleDialog doesn't crash in 0x0 environment #174229

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahmedsameha1
Copy link
Contributor

This is my attempt to handle #6537 for the SimpleDialog UI control.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Aug 21, 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 a SimpleDialog does not crash when rendered in a zero-sized area. The test is a good addition to prevent future regressions. I have one minor suggestion to fix a typo in the test description.

@@ -3021,6 +3021,14 @@ void main() {
expect(find.byType(BackButton), findsNothing);
expect(find.byType(CloseButton), findsOneWidget);
});

testWidgets("SimpleDialog doens't 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

There's a small typo in the test description. "doens't" should be "doesn't".

Suggested change
testWidgets("SimpleDialog doens't crash at zero area", (WidgetTester tester) async {
testWidgets("SimpleDialog doesn't crash at zero area", (WidgetTester tester) async {

@ahmedsameha1 ahmedsameha1 force-pushed the handle#6537-SimpleDialog branch from 3eb9f53 to ccbeae2 Compare August 21, 2025 17:41
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. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant