Tracking ScrollView Offsets in SwiftUI (Three Ways That Actually Work)
The PreferenceKey snippet everyone copy-pastes silently reports a frozen 0.0 — and the coordinate space isn't why. Here's the fix, plus scrollPosition(id:) and onScrollGeometryChange.