PredictiveScrollEngine class

A stateless, pure-math engine that predicts where a scroll will stop.

Uses Flutter's deterministic scroll physics constants (empirically derived from ClampingScrollSimulation on Android and BouncingScrollSimulation on iOS) to compute the final resting position from current position and velocity.

This engine is intentionally stateless: it takes a snapshot of scroll metrics and returns a prediction. Stateful tracking (e.g. stabilization, emission) belongs in VideoPool.

Constructors

PredictiveScrollEngine()
Creates a predictive scroll engine.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
predict({required double position, required double velocity, required double itemExtent, required int itemCount, TargetPlatform? platform}) PredictionResult?
Predict where the scroll will stop based on current physics.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited