ScrollPosition constructor
- required ScrollPhysics physics,
- required ScrollContext context,
- bool keepScrollOffset = true,
- ScrollPosition? oldPosition,
- String? debugLabel,
Creates an object that determines which portion of the content is visible in a scroll view.
Implementation
ScrollPosition({
required this.physics,
required this.context,
this.keepScrollOffset = true,
ScrollPosition? oldPosition,
this.debugLabel,
}) {
if (oldPosition != null) {
absorb(oldPosition);
}
if (keepScrollOffset) {
restoreScrollOffset();
}
}