Skip to content

Improve NestedScrollView and internal scrolling test in the nested_scroll_view_test.dart #102307

@TahaTesser

Description

@TahaTesser

testWidgets('NestedScrollViews with custom physics', (WidgetTester tester) async {

NestedScrollView and internal scrolling test uses ListTile.
In the new PR, I've added Material to the ListTile widget in the list_tile.dart, which updated the layer tree in this test since this test uses a ListTile

return ListTile(
title: Text('Item $index'),
);

Following lines are not iterating through children's layers, it only accounts for whichever children's layer is first.
After updating LisTile, the children's layer is grown.

if (child is ContainerLayer) {
final PhysicalModelLayer? candidate = _dfsFindPhysicalLayer(child);
if (candidate != null) {
return candidate;
}
}

Solution

Improve logic to iterate children's layers.

Metadata

Metadata

Assignees

Labels

a: tests"flutter test", flutter_test, or one of our testsframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions