TableViewMetricsResolver class

Resolves column width specifications against BoxConstraints.

Produces a list of column widths whose sum satisfies the BoxConstraints.maxWidth property of the constraints and whose values are as close as possible to satisfying the column width specifications.

The sum of the column widths isn't required to satisfy the BoxConstraints.minWidth property of the constraints because the table view can be wider than the sum of its columns (yielding blank space), but it can't be skinnier.

The returned list is guaranteed to be the same length as columns and contain only non-negative finite values.

Implemented types
Annotations

Properties

columnBounds List<Range>
The offsets & widths of the columns in the table view.
final
columns List<AbstractTableColumn>
The columns of the table view.
final
constraints BoxConstraints
The BoxConstraints against which the width specifications of the columns were resolved.
final
hashCode int
The hash code for this object.
no setterinherited
length int
The number of rows in the table view.
final
rowHeight double
The fixed row height of each row in the table view.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalHeight double
no setter
totalWidth double
The total column width of the table view.
no setter

Methods

getCellAt(Offset position) TableCellOffset?
Gets the cell coordinates found at the specified offset.
override
getCellBounds(int rowIndex, int columnIndex) Rect
Gets the bounding Rect of the specified cell in the table view.
override
getColumnAt(double dx) int
Gets the column index found at the specified x-offset.
override
getColumnBounds(int columnIndex) Rect
Gets the bounding Rect of the specified column in the table view.
override
getRowAt(double dy) int
Gets the row index found at the specified y-offset.
override
getRowBounds(int rowIndex) Rect
Gets the bounding Rect of the specified row in the table view.
override
intersect(Rect rect) TableCellRect
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

Static Methods

of(List<AbstractTableColumn> columns, double rowHeight, int length, BoxConstraints constraints, {bool roundWidths = false}) TableViewMetricsResolver