how to flatlist detects pull to refresh in internally react native code example
Example: react native flatlist pull to refresh
// Make sure to also set the refreshing prop correctly.
<FlatList
data={ this.state.FlatListItems }
onRefresh={() => this.onRefresh()}
refreshing={this.state.isFetching}
/>