ExtendedPagePosition constructor
ExtendedPagePosition({
- required ScrollPhysics physics,
- required ScrollContext context,
- int initialPage = 0,
- bool keepPage = true,
- double viewportFraction = 1.0,
- ScrollPosition? oldPosition,
- double pageSpacing = 0.0,
Implementation
ExtendedPagePosition({
required ScrollPhysics physics,
required ScrollContext context,
this.initialPage = 0,
bool keepPage = true,
double viewportFraction = 1.0,
ScrollPosition? oldPosition,
double pageSpacing = 0.0,
}) : assert(initialPage != null),
assert(keepPage != null),
assert(viewportFraction != null),
assert(viewportFraction > 0.0),
assert(pageSpacing != null),
assert(pageSpacing >= 0.0),
_viewportFraction = viewportFraction,
_pageSpacing = pageSpacing,
_pageToUseOnStartup = initialPage.toDouble(),
super(
physics: physics,
context: context,
initialPixels: null,
keepScrollOffset: keepPage,
oldPosition: oldPosition,
);