crossAxisGlobalOrigin property
Global x of the tree sliver's own cross-axis origin, i.e. where
sliver-local x = 0 lands on screen, or 0.0 when isLaidOut is
false.
NOT the viewport's left edge: a SliverPadding (or any sliver that
insets its child in the cross axis) shifts the tree's band inside
the viewport, and a presentation layer that anchors on the viewport
paints the drag proxy in a frame the rows do not live in.
Implementation
@override
double get crossAxisGlobalOrigin {
// getTransformTo asserts `attached`, and there is no frame to speak
// of before the first layout. The ancestor chain applies each
// sliver's paint offset (a SliverPadding's cross-axis inset included)
// and the viewport's own placement; taking only `.dx` is safe because
// performLayout refuses every non-vertical, non-forward configuration.
if (geometry == null || !attached) {
return 0.0;
}
return MatrixUtils.transformPoint(getTransformTo(null), Offset.zero).dx;
}