KLineScrollMetrics class

用户滚动时传给 delegate 的滚动位置信息。

core 只负责把 ScrollView 的当前位置和边界透出;业务方可根据 pixelsminScrollExtentmaxScrollExtent 自行判断左侧或右侧阈值,例如距离右侧 20px 时加载最新数据,或接近左侧时加载更旧数据。

Annotations

Constructors

KLineScrollMetrics({required double pixels, required double minScrollExtent, required double maxScrollExtent, required double viewportDimension, required double scrollDelta, required double extentBefore, required double extentAfter})
const

Properties

extentAfter double
当前位置右侧还剩余的距离。
final
extentBefore double
当前位置左侧已经滚过的距离。
final
hashCode int
The hash code for this object.
no setterinherited
maxScrollExtent double
最大可滚动位置,也就是内容最右侧。
final
minScrollExtent double
最小可滚动位置,通常为 0。
final
pixels double
当前横向滚动偏移量。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDelta double
本次滚动更新相对上一帧的偏移变化。
final
viewportDimension double
当前视口宽度。
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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