|
|
|
|
|
|
return page * this.viewportDimension * this.viewportFraction; |
|
|
|
} |
|
|
|
|
|
|
|
public double page => this.getPageFromPixels(this.pixels.clamp(this.minScrollExtent, this.maxScrollExtent), |
|
|
|
this.viewportDimension); |
|
|
|
public double page { |
|
|
|
get { |
|
|
|
return this.getPageFromPixels(this.pixels.clamp(this.minScrollExtent, this.maxScrollExtent), |
|
|
|
this.viewportDimension); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
protected override void saveScrollOffset() { |
|
|
|
PageStorage.of(this.context.storageContext)?.writeState(this.context.storageContext, |
|
|
|
|
|
|
public override bool applyViewportDimension(double viewportDimension) { |
|
|
|
double oldViewportDimensions = this.viewportDimension; |
|
|
|
bool result = base.applyViewportDimension(viewportDimension); |
|
|
|
double oldPixels = this.pixels; |
|
|
|
double? oldPixels = null; |
|
|
|
if (this.hasPixles) { |
|
|
|
oldPixels = this.pixels; |
|
|
|
} |
|
|
|
: this.getPageFromPixels(oldPixels, oldViewportDimensions); |
|
|
|
: this.getPageFromPixels(oldPixels.Value, oldViewportDimensions); |
|
|
|
double newPixels = this.getPixelsFromPage(page); |
|
|
|
if (newPixels != oldPixels) { |
|
|
|
this.correctPixels(newPixels); |
|
|
|