mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that a ChoiceChip doesn't crash in 0x0 environment (#173322)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the ChoiceChip UI control.
This commit is contained in:
parent
1c0ee96c8f
commit
72e1bf1a15
@ -848,4 +848,18 @@ void main() {
|
||||
SystemMouseCursors.forbidden,
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('ChoiceChip renders at zero area', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Center(
|
||||
child: SizedBox.shrink(
|
||||
child: Scaffold(body: ChoiceChip(label: Text('X'), selected: true)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
final Finder xText = find.text('X');
|
||||
expect(tester.getSize(xText).isEmpty, isTrue);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user