how do I get offset positions of items in my FlatList?

1.1k Views Asked by At

I would like to use FlatList method scrollToOffset to scroll to a specific item in my FlatList. The reason I am not using scrollToIndex is that with scrollToIndex I cannot control the speed of the scroll. With scrollToOffset I could use Animated library to change the value gradually. However, I have no idea how to find the offset values of items in my FlatList.

1

There are 1 best solutions below

1
On

have a look into flat list documentation.

onViewableItemsChanged

that might help