ExtendedPagePosition constructor

ExtendedPagePosition({
  1. required ScrollPhysics physics,
  2. required ScrollContext context,
  3. int initialPage = 0,
  4. bool keepPage = true,
  5. double viewportFraction = 1.0,
  6. ScrollPosition? oldPosition,
  7. 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,
      );