Make sure that a DateRangePickerDialog doesn't crash in 0x0 environments#173754
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a regression test to ensure that DateRangePickerDialog does not crash when rendered in a zero-sized environment, addressing a reported issue. The test case is well-defined and covers the scenario. My review includes a couple of suggestions to improve the test's maintainability and clarity by adding a comment linking to the original issue and explicitly asserting that no exceptions are thrown, which are common practices in this test file.
| }); | ||
| }); | ||
|
|
||
| testWidgets('DateRangePickerDialog renders at zero area', (WidgetTester tester) async { |
There was a problem hiding this comment.
For better maintainability and to provide context for this test, it's a good practice to add a comment linking to the issue it's fixing. This is a common pattern in this test file.
// Regression test for https://github.com/flutter/flutter/issues/6537
testWidgets('DateRangePickerDialog renders at zero area', (WidgetTester tester) async {
| ); | ||
| }); |
c8f6806 to
bfe9dd4
Compare
bfe9dd4 to
f87f9ae
Compare
dkwingsmt
left a comment
There was a problem hiding this comment.
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
| ), | ||
| ), | ||
| ); | ||
| expect(tester.getSize(find.byType(DateRangePickerDialog)).isEmpty, isTrue); |
There was a problem hiding this comment.
| expect(tester.getSize(find.byType(DateRangePickerDialog)).isEmpty, isTrue); | |
| expect(tester.getSize(find.byType(DateRangePickerDialog)), Size.zero); |
|
autosubmit label was removed for flutter/flutter/173754, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR. |
532f0e7 to
804c9be
Compare
flutter/flutter@7811e89...65aca36 2025-10-02 [email protected] Roll Skia from 257c1f94afaa to 05c1f5803415 (4 revisions) (flutter/flutter#176402) 2025-10-02 [email protected] [ Widget Preview ] Fix resolution for workspace "hosted" dependencies (flutter/flutter#176358) 2025-10-02 [email protected] Roll Skia from b5d8ae8d3410 to 257c1f94afaa (6 revisions) (flutter/flutter#176389) 2025-10-02 [email protected] Delete Skia-specific performance overlay implementation (flutter/flutter#176364) 2025-10-02 [email protected] Roll Fuchsia Linux SDK from 1Ai6VL4vb_GdGnWhg... to Vnoygds8HtDUvGLCK... (flutter/flutter#176381) 2025-10-01 [email protected] [ Widget Preview ] Persist "Filter by Selected File" toggle (flutter/flutter#176289) 2025-10-01 [email protected] Roll Skia from c44a36470d07 to b5d8ae8d3410 (5 revisions) (flutter/flutter#176367) 2025-10-01 [email protected] Reapply "Update the AccessibilityPlugin::Announce method to account f… (flutter/flutter#176107) 2025-10-01 [email protected] Roll Dart SDK from 8ffec1435cf3 to 4f90a06328cb (3 revisions) (flutter/flutter#176369) 2025-10-01 [email protected] [ Tool / l10n ] Fix issue where localization generator assumed current directory was the target project (flutter/flutter#175881) 2025-10-01 [email protected] Make sure that a DateRangePickerDialog doesn't crash in 0x0 environments (flutter/flutter#173754) 2025-10-01 [email protected] Make sure that a DrawerButton doesn't crash in 0x0 environment (flutter/flutter#172948) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…nts (flutter#173754) This is my attempt to handle flutter#6537 for the DateRangePickerDialog UI control.
…nts (flutter#173754) This is my attempt to handle flutter#6537 for the DateRangePickerDialog UI control.
This is my attempt to handle #6537 for the DateRangePickerDialog UI control.