From 647ce0c00a56ef818c1f650329c5e946d8307fd0 Mon Sep 17 00:00:00 2001 From: Ahmed Mohamed Sameh Date: Sun, 2 Nov 2025 22:25:56 +0200 Subject: [PATCH] =?UTF-8?q?Make=20sure=20that=20a=20LinearProgressIndicato?= =?UTF-8?q?r=20doesn't=20crash=20in=200x0=20environ=E2=80=A6=20(#177553)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the LinearProgressIndicator widget. Co-authored-by: Tong Mu --- .../flutter/test/material/progress_indicator_test.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/flutter/test/material/progress_indicator_test.dart b/packages/flutter/test/material/progress_indicator_test.dart index 7aa1dd1e71d..dcc21a44952 100644 --- a/packages/flutter/test/material/progress_indicator_test.dart +++ b/packages/flutter/test/material/progress_indicator_test.dart @@ -1969,6 +1969,15 @@ void main() { paints..arc(startAngle: 1.5707963267948966, sweepAngle: 0.001), ); }); + + testWidgets('LinearProgressIndicator does not crash at zero area', (WidgetTester tester) async { + await tester.pumpWidget( + const MaterialApp( + home: Center(child: SizedBox.shrink(child: LinearProgressIndicator())), + ), + ); + expect(tester.getSize(find.byType(LinearProgressIndicator)), Size.zero); + }); } class _RefreshProgressIndicatorGolden extends StatefulWidget {