A viewport usually has two coordinate systems and works as an adapter between the two:
The inner coordinate system has its origin at the top left corner of the content that moves inside the viewport. The origin of this coordinate system usually moves around relative to the leading edge of the viewport when the viewport offset changes.
The outer coordinate system has its origin at the top left corner of the visible part of the viewport. This origin stays at the same position regardless of the current viewport offset.
- RenderAbstractViewport.getOffsetToReveal, which calculates this value for a specific element.
final Rect rect