import SwiftUI /// Tracks scroll offset in scrollable views public struct ViewOffsetPreferenceKey: PreferenceKey { public typealias Value = CGFloat public static var defaultValue = CGFloat.zero public static func reduce(value: inout Value, nextValue: () -> Value) { value += nextValue() } }