applyTo method
- @override
override
If parent is null then return a ScrollPhysics with the same
runtimeType where the parent has been replaced with the ancestor
.
If this scroll physics object already has a parent, then this method is applied recursively and ancestor will appear at the end of the existing chain of parents.
The returned object will combine some of the behaviors from this
ScrollPhysics instance and some of the behaviors from ancestor
.
See also:
- buildParent, a utility method that's often used to define applyTo methods for ScrollPhysics subclasses.
Implementation
@override
ClampingScrollPhysics applyTo(ScrollPhysics ancestor) {
return ClampingScrollPhysics(parent: buildParent(ancestor));
}