mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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:
parent
951b3cad03
commit
b076f52ee1
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user