FixedExtentMetrics class

Metrics for a ScrollPosition to a scroll view with fixed item sizes.

The metrics are available on ScrollNotifications generated from a scroll views such as ListWheelScrollViews with a FixedExtentScrollController and exposes the current itemIndex and the scroll view's itemExtent.

FixedExtent refers to the fact that the scrollable items have the same size. This is distinct from Fixed in the parent class name's FixedScrollMetric which refers to its immutability.

Inheritance

Constructors

FixedExtentMetrics({@required double minScrollExtent, @required double maxScrollExtent, @required double pixels, @required double viewportDimension, @required AxisDirection axisDirection, @required int itemIndex })
Creates an immutable snapshot of values associated with a ListWheelScrollView.

Properties

itemIndex int
The scroll view's currently selected item index.
final
atEdge bool
Whether the pixels value is exactly at the minScrollExtent or the maxScrollExtent.
read-only, inherited
axis Axis
The axis in which the scroll view scrolls.
read-only, inherited
axisDirection AxisDirection
The direction in which the scroll view scrolls.
final, inherited
extentAfter double
The quantity of content conceptually "below" the currently visible content of the viewport in the scrollable. This is the content below the content described by extentInside.
read-only, inherited
extentBefore double
The quantity of content conceptually "above" the currently visible content of the viewport in the scrollable. This is the content above the content described by extentInside.
read-only, inherited
extentInside double
The quantity of visible content. [...]
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
maxScrollExtent double
The maximum in-range value for pixels. [...]
final, inherited
minScrollExtent double
The minimum in-range value for pixels. [...]
final, inherited
outOfRange bool
Whether the pixels value is outside the minScrollExtent and maxScrollExtent.
read-only, inherited
pixels double
The current scroll position, in logical pixels along the axisDirection.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
viewportDimension double
The extent of the viewport along the axisDirection.
final, inherited

Methods

copyWith({double minScrollExtent, double maxScrollExtent, double pixels, double viewportDimension, AxisDirection axisDirection, int itemIndex }) FixedExtentMetrics
Creates a ScrollMetrics that has the same properties as this object. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited