resizeRow method
Resizes a specific row to a new height.
Parameters:
row(int, required): Row index.height(double, required): New height in pixels.
Returns: bool — true if resize succeeded, false otherwise.
Implementation
bool resizeRow(int row, double height) {
if (row < 0 || height < 0) {
return false;
}
height = height.clamp(
_heightConstraints?[row]?.min ?? _defaultHeightConstraint?.min ?? 0,
_heightConstraints?[row]?.max ??
_defaultHeightConstraint?.max ??
double.infinity);
if (_rowHeights != null && _rowHeights![row] == height) {
return false;
}
_rowHeights ??= {};
_rowHeights![row] = height;
notifyListeners();
return true;
}