Skip to content

Commit 87bac26

Browse files
authored
Make sure that a TableRowInkWell doesn't crash in 0x0 environment (flutter#173627)
This is my attempt to handle flutter#6537 for the TableRowInkWell UI control.
1 parent 3c1e258 commit 87bac26

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/flutter/test/material/data_table_test.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,6 +1905,22 @@ void main() {
19051905
expect(secondaryTapped, isTrue);
19061906
expect(secondaryTappedDown, isTrue);
19071907
});
1908+
1909+
testWidgets('TableRowInkWell renders at zero area', (WidgetTester tester) async {
1910+
await tester.pumpWidget(
1911+
MaterialApp(
1912+
home: Material(
1913+
child: SizedBox.shrink(
1914+
child: Table(
1915+
children: const <TableRow>[
1916+
TableRow(children: <Widget>[TableRowInkWell(child: Text('X'))]),
1917+
],
1918+
),
1919+
),
1920+
),
1921+
),
1922+
);
1923+
});
19081924
});
19091925

19101926
testWidgets('Heading cell cursor resolves MaterialStateMouseCursor correctly', (

0 commit comments

Comments
 (0)