Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
++
  • Loading branch information
Piinks committed Oct 13, 2023
commit c62a209cbc07b11e578225251d3e6d85317a5e29
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ class RenderTableViewport extends RenderTwoDimensionalViewport {
}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain to me how the padding is taken into account when calculating the start and end (input to this method) cells?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_Span.trailingOffset is used to calculate the start and end, which includes the padding. There are even tests for this case. Awesome!

// TODO(Piinks): Assert here or somewhere else merged cells cannot span
// pinned and unpinned cells (for merged cell follow-up), https://github.com/flutter/flutter/issues/131224
late double yPaintOffset = -offset.dy;
double yPaintOffset = -offset.dy;
for (int row = start.row; row <= end.row; row += 1) {
double xPaintOffset = -offset.dx;
final double rowHeight = _rowMetrics[row]!.extent;
Expand Down