I can only find example on how to use onScrollTargetVisibilityChange for ScrollViews. Is there any way I can use this modifier for Lists as well? List {}.onScrollTargetVisibilityChange ( ... ) is not working for me :(
The onScrollTargetVisibilityChange API work for scroll view and not a SwiftUI List.
If you'd like us to consider adding the necessary functionality for a List, please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here. If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?