mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that an InkWell doesn't crash in 0x0 environment (#175871)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the InkWell widget. Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
This commit is contained in:
parent
6a424a63e3
commit
bfb0be2167
@ -2588,4 +2588,15 @@ void main() {
|
||||
|
||||
controller.dispose();
|
||||
});
|
||||
|
||||
testWidgets('InkWell does not crash at zero area', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Center(child: SizedBox.shrink(child: InkWell())),
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(tester.getSize(find.byType(InkWell)), Size.zero);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user