Skip to content

NestedScrollView should allow overriding the physics of the outer scroll view #11322

@collinjackson

Description

@collinjackson

Right now if you pass a custom ScrollPhysics to a NestedScrollView it'll override some of the interesting methods with a ClampingScrollPhysics implementation. I think the physics parameter of NestedScrollView should override the default (ClampingScrollPhysics), so instead of

return new CustomScrollView(
  // ...
  physics: new ClampingScrollPhysics(parent: widget.physics),
);

it would be

return new CustomScrollView(
  // ...
  physics: widget.physics ?? new ClampingScrollPhysics(),
);

/cc @Hixie @HansMuller

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions