From 3ff025970a8fc2d9f5c77e35b4e181c2e7aed4ef Mon Sep 17 00:00:00 2001 From: Ahmed Mohamed Sameh Date: Sat, 22 Nov 2025 03:06:40 +0200 Subject: [PATCH] =?UTF-8?q?Make=20sure=20that=20a=20CupertinoLinearActivit?= =?UTF-8?q?yIndicator=20doesn't=20crash=20in=200x=E2=80=A6=20(#178566)?= 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 CupertinoLinearActivityIndicator widget. Co-authored-by: Tong Mu Co-authored-by: Victor Sanni --- .../test/cupertino/activity_indicator_test.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/flutter/test/cupertino/activity_indicator_test.dart b/packages/flutter/test/cupertino/activity_indicator_test.dart index 5171b675740..64e58464d07 100644 --- a/packages/flutter/test/cupertino/activity_indicator_test.dart +++ b/packages/flutter/test/cupertino/activity_indicator_test.dart @@ -213,6 +213,19 @@ void main() { ); }); }); + + testWidgets('CupertinoLinearActivityIndicator does not crash at zero area', ( + WidgetTester tester, + ) async { + await tester.pumpWidget( + const CupertinoApp( + home: Center( + child: SizedBox.shrink(child: CupertinoLinearActivityIndicator(progress: 0.5)), + ), + ), + ); + expect(tester.getSize(find.byType(CupertinoLinearActivityIndicator)), Size.zero); + }); } Widget buildCupertinoActivityIndicator([bool? animating]) {