Make sure that a TabPageSelectorIndicator doesn't crash in 0x0 enviro… (#178212)

This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
TabPageSelectorIndicator widget.
This commit is contained in:
Ahmed Mohamed Sameh 2025-11-11 02:34:17 +02:00 committed by GitHub
parent 951b3cad03
commit b076f52ee1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
});
}