FitGridMeasuredRowMetrics class final

Measured row heights. See FitGridRowMetrics.measured.

Equality is identity, deliberately. Comparing two height tables element by element is O(rows), and it would run on every build of a grid that is scrolling — which is the one place this package refuses to spend O(rows). The widget layer memoizes the metrics it builds, so the same instance comes back when nothing relevant changed, and identity is exactly the right test.

Inheritance

Constructors

FitGridMeasuredRowMetrics(List<double> heights)

Properties

hashCode → int
The hash code for this object.
no setterinherited
isUniform → bool
Whether all rows share one height. Callers that can take a cheaper path when they do — and there are a few — branch on this.
no setteroverride
rowCount → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalHeight → double
Total height of every row, whether or not it is on screen.
no setteroverride

Methods

clampedRowAt(double y) → int
The row containing y, clamped into range rather than rejected. This is what windowing wants: a scroll position slightly past either end should still name the first or last row.
override
heightOf(int row) → double
Height of a single row.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offsetOf(int row) → double
Top edge of a row in content space. Defined for row == rowCount, where it equals totalHeight, so a caller can ask for the bottom edge of the last row without a special case.
override
rowAtOffset(double y) → int
The row containing y in content space, or -1 when y falls outside the content.
inherited
rowsSpanning(int firstRow, double extent) → int
How many rows are needed to cover extent pixels starting at firstRow, including the partially visible row at each end.
override
toString() → String
A string representation of this object.
override

Operators

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