Skip to content

Commit 3c1e258

Browse files
authored
Make sure that a DatePickerDialog doesn't crash in 0x0 environment (flutter#173677)
This is my attempt to handle flutter#6537 for the DatePickerDialog UI control.
1 parent 231d346 commit 3c1e258

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/flutter/test/material/date_picker_test.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,6 +2750,16 @@ void main() {
27502750
expect(lastDayText.data, equals('28'));
27512751
});
27522752
});
2753+
2754+
testWidgets('DatePickerDialog renders at zero area', (WidgetTester tester) async {
2755+
await tester.pumpWidget(
2756+
MaterialApp(
2757+
home: SizedBox.shrink(
2758+
child: DatePickerDialog(firstDate: firstDate, lastDate: lastDate),
2759+
),
2760+
),
2761+
);
2762+
});
27532763
}
27542764

27552765
class _RestorableDatePickerDialogTestWidget extends StatefulWidget {

0 commit comments

Comments
 (0)