Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion packages/flutter/test/widgets/table_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,24 @@ void main() {
'Every TableRow in a Table must have at least one child, so there is no empty row.',
);
});

// Regression test for https://github.com/flutter/flutter/issues/180337.
// Verifies that placing a Slider (which uses OverlayPortal) inside a TableRow
// does not trigger a render object ownership assertion.
testWidgets('Table widget - Slider inside TableRow does not crash', (WidgetTester tester) async {
await tester.pumpWidget(
const MaterialApp(
home: Scaffold(
body: Table(
children: <TableRow>[
TableRow(children: <Widget>[Slider(value: 0.0, onChanged: null)]),
],
),
),
),
);
await tester.pumpAndSettle();
expect(tester.takeException(), isNull);
Comment on lines +933 to +934

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two lines are unnecessary.

});
testWidgets('Set defaultVerticalAlignment to intrinsic height and check their heights', (
WidgetTester tester,
) async {
Expand Down