From b076f52ee1ae95d41fd93221ba514e7f8a829328 Mon Sep 17 00:00:00 2001 From: Ahmed Mohamed Sameh Date: Tue, 11 Nov 2025 02:34:17 +0200 Subject: [PATCH] =?UTF-8?q?Make=20sure=20that=20a=20TabPageSelectorIndicat?= =?UTF-8?q?or=20doesn't=20crash=20in=200x0=20enviro=E2=80=A6=20(#178212)?= 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 TabPageSelectorIndicator widget. --- packages/flutter/test/material/tabs_test.dart | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/flutter/test/material/tabs_test.dart b/packages/flutter/test/material/tabs_test.dart index f412e3ac998..9650c8bb80d 100644 --- a/packages/flutter/test/material/tabs_test.dart +++ b/packages/flutter/test/material/tabs_test.dart @@ -9346,4 +9346,23 @@ void main() { expect(tester.takeException(), isNull); }); + + testWidgets('TabPageSelectorIndicator does not crash in 0x0 environment', ( + WidgetTester tester, + ) async { + await tester.pumpWidget( + const MaterialApp( + home: Center( + child: SizedBox.shrink( + child: TabPageSelectorIndicator( + backgroundColor: Colors.red, + borderColor: Colors.blue, + size: 1, + ), + ), + ), + ), + ); + expect(tester.getSize(find.byType(TabPageSelectorIndicator)), Size.zero); + }); }