Skip to content

Commit 4499cf6

Browse files
Make sure that a CircularProgressIndicator doesn't crash in 0x0 envir… (flutter#177555)
This is my attempt to handle flutter#6537 for the CircularProgressIndicator widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
1 parent 518722a commit 4499cf6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/flutter/test/material/progress_indicator_test.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,15 @@ void main() {
19701970
);
19711971
});
19721972

1973+
testWidgets('CircularProgressIndicator does not crash at zero area', (WidgetTester tester) async {
1974+
await tester.pumpWidget(
1975+
const MaterialApp(
1976+
home: Center(child: SizedBox.shrink(child: CircularProgressIndicator())),
1977+
),
1978+
);
1979+
expect(tester.getSize(find.byType(CircularProgressIndicator)), Size.zero);
1980+
});
1981+
19731982
testWidgets('LinearProgressIndicator does not crash at zero area', (WidgetTester tester) async {
19741983
await tester.pumpWidget(
19751984
const MaterialApp(

0 commit comments

Comments
 (0)