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:
Ahmed Mohamed Sameh 2025-10-10 07:58:52 +03:00 committed by GitHub
parent 6a424a63e3
commit bfb0be2167
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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