viewportFraction property

  1. @override
double get viewportFraction
override

The fraction of the viewport that each page occupies.

Used to compute page from the current pixels.

Implementation

@override
double get viewportFraction => _viewportFraction;
set viewportFraction (double value)

Implementation

set viewportFraction(double value) {
  if (_viewportFraction == value) return;
  final double? oldPage = page;
  _viewportFraction = value;
  if (oldPage != null) forcePixels(getPixelsFromPage(oldPage));
}